कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is printed by the C code: struct P { int x, y; } p = {3, 4}, *q = &p; q->y += p.x; printf("%d", p.y); ?
सही उत्तर: ग) 7
q points to p, so q->y += p.x changes p.y from 4 to 4 + 3 = 7.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: char *s = "Kathmandu"; printf("%d", (int)(strchr(s, 'm') - s)); ?
सही उत्तर: घ) 4
strchr() returns a pointer to the first 'm', which is at index 4 (K=0, a=1, t=2, h=3, m=4); subtracting s gives that index.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int i; for (i = 0; i < 10; i++) { if (i % 4 == 3) break; } printf("%d", i); ?
सही उत्तर: क) 3
The first i with i % 4 == 3 is 3, where break leaves the loop before i is incremented again.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int i = 0; do { i += 2; } while (i < 7); printf("%d", i); ?
सही उत्तर: क) 8
i becomes 2, 4, 6 and then 8; the condition 8 < 7 is false, so the loop stops with i = 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: unsigned int u = 0; u--; printf("%d", u > 0); ?
सही उत्तर: ख) 1
Unsigned arithmetic wraps around, so 0 - 1 becomes the largest unsigned value (UINT_MAX), which is greater than 0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int a = 1; a <<= 3; a |= 1; printf("%d", a); ?
सही उत्तर: ग) 9
1 << 3 is 8 (binary 1000); OR-ing with 1 sets the lowest bit, giving 1001 = 9.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: printf("%c", 'a' + 25); ?
सही उत्तर: घ) z
The letters are consecutive in ASCII, so 25 places after 'a' is 'z'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: char s[] = "NePaL"; int i, c = 0; for (i = 0; s[i]; i++) if (isupper(s[i])) c++; printf("%d", c); ?
सही उत्तर: घ) 3
The loop runs until the null character and counts the upper-case letters N, P and L using isupper().
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: char str[] = "abcde"; char *p = str + 3; printf("%s", p); ?
सही उत्तर: क) de
p points to str[3], which is d, and %s prints from there up to the null terminator.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: float f = 0.1f; if (f == 0.1) printf("equal"); else printf("not equal"); ?
सही उत्तर: ख) not equal
0.1 cannot be stored exactly in binary; the float approximation differs from the double constant 0.1, so the comparison is false.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।