कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is printed by the C code: int n = 37, b = 0, p = 1; while (n) { b += (n % 2) * p; p *= 10; n /= 2; } printf("%d", b); ?
सही उत्तर: क) 100101
The loop builds the binary digits of 37 as a decimal-looking number: 37 = 100101 in binary.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Combining bitwise operators in C, which value does printf("%d", (5 & 3) | (5 ^ 3)); display?
सही उत्तर: घ) 7
5 & 3 = 1 and 5 ^ 3 = 6; 1 | 6 = 7.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int x = 2, y = 3; x = x ^ y; printf("%d", x & y); ?
सही उत्तर: ग) 1
2 ^ 3 = 10 ^ 11 = 01 = 1; then 1 & 3 = 1.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int x = 4, y; y = x > 3 ? x-- : ++x; printf("%d %d", x, y); ?
सही उत्तर: ख) 3 4
x > 3 is true, so y gets the old value 4 (post-decrement) and x becomes 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int n = 0; char *s = "a,b,,c"; while (*s) if (*s++ == ',') n++; printf("%d", n); ?
सही उत्तर: क) 3
The string contains three comma characters (one after a, two after b), so n = 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int a[] = {5, 10, 15, 20}, *p = a; p += 2; printf("%d", *p + (int)(p - a)); ?
सही उत्तर: घ) 17
p points to a[2] = 15 and p - a = 2, so 15 + 2 = 17.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: char s[] = "Lumbini"; printf("%c", *s + 1); ?
सही उत्तर: ग) M
*s is 'L'; adding 1 gives the next character code, 'M' (the * binds before +).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int i, s = 0; for (i = 5; i >= 1; i--) s = s * 10 + i; printf("%d", s); ?
सही उत्तर: ख) 54321
Each step appends the digit i: 5, 54, 543, 5432, 54321.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int x = 7; x %= 4; x <<= 2; printf("%d", x); ?
सही उत्तर: क) 12
7 % 4 = 3, and 3 << 2 = 3 x 4 = 12.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Pseudocode: X = 1; repeat X = X * 3 until X > 100; print X. What is printed?
सही उत्तर: क) 243
X becomes 3, 9, 27, 81 and then 243; 243 is the first value greater than 100, so the loop stops.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।