कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is printed by the C code: char *s = "programming"; printf("%.4s", s + 3); ?
सही उत्तर: क) gram
s + 3 points to "gramming" and the precision .4 prints only its first 4 characters.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A two-dimensional C array is initialised with a flat list: int a[2][3] = {1, 2, 3, 4, 5, 6};. What does printf("%d", a[1][1] + **a); then print?
सही उत्तर: क) 6
Rows are filled in order, so a[1][1] = 5, and **a is a[0][0] = 1; 5 + 1 = 6.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int i, j; for (i = 0, j = 10; i < j; i += 3, j -= 2); printf("%d", i + j); ?
सही उत्तर: क) 12
(i, j) goes (0, 10), (3, 8), (6, 6); the condition 6 < 6 fails, so i + j = 12.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int i = 0, s = 0; do { s += i; i += 3; } while (i < 10); printf("%d", s); ?
सही उत्तर: घ) 18
The body adds i = 0, 3, 6 and 9 (after which i becomes 12 and the loop stops), giving 18.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C statement printf("%d", 017 + 0x11 + 11); ?
सही उत्तर: घ) 43
017 is octal (15), 0x11 is hexadecimal (17) and 11 is decimal, so 15 + 17 + 11 = 43.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: unsigned x = 0x5A; printf("%X", x >> 4 | x << 4 & 0xFF); ?
सही उत्तर: ख) A5
x >> 4 = 0x5 and (x << 4) & 0xFF = 0xA0 (& binds tighter than |), so the result 0xA5 swaps the two hexadecimal digits.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given enum day {SUN = 1, MON, TUE = 5, WED}; in C, what is printed by printf("%d", MON + WED); ?
सही उत्तर: क) 8
An enumerator without a value is one more than the previous one: MON = 2 and WED = 6, so the sum is 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: struct item { char name[10]; int qty; float price; } it = {"Pen", 3, 12.5}; printf("%.1f", it.qty * it.price); ?
सही उत्तर: ग) 37.5
The members are initialised in order, so qty = 3 and price = 12.5, and 3 * 12.5 = 37.5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given int g(void) { static int n = 1; n *= 2; return n; }, what is printed by printf("%d", g() + g() + g()); ?
सही उत्तर: ग) 14
The static variable keeps its value between calls, so the calls return 2, 4 and 8, whose sum is 14 in any evaluation order.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A C function makes two recursive calls around a print: void p(int n) { if (n > 0) { p(n - 1); printf("%d", n); p(n - 1); } }. Which digit string does the call p(3) produce?
सही उत्तर: ग) 1213121
p(1) prints 1; p(2) prints p(1), 2, p(1) = 121; p(3) prints p(2), 3, p(2) = 1213121.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।