कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
१,५०२ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
A C function declared with return type void:
सही उत्तर: क) does not return any value
void as the return type means the function returns no value to the caller.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given int f(int n) { return n == 0 ? 0 : n % 10 + f(n / 10); } what does f(1234) return?
सही उत्तर: घ) 10
The function adds the digits: 4 + 3 + 2 + 1 = 10.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given int fib(int n) { return n < 2 ? n : fib(n-1) + fib(n-2); } what does fib(6) return?
सही उत्तर: ग) 8
The sequence is 0, 1, 1, 2, 3, 5, 8, so fib(6) = 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C: void f(int x) { x = 10; } int a = 5; f(a); printf("%d", a); What is printed?
सही उत्तर: ग) 5
C passes arguments by value; f changes only its own copy x, so a remains 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
How many times is "x" printed by: int i = 3; while (i--) printf("x"); ?
सही उत्तर: ख) 3
i-- tests 3, 2, 1 (true) and then 0 (false), so the body runs 3 times.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the value of s after: int s = 0, i; for (i = 1; i <= 10; i++) s += i; ?
सही उत्तर: ग) 55
s = 1 + 2 + ... + 10 = 10 x 11 / 2 = 55.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
How many times does the body of for (i = 1; i <= 100; i *= 2) execute?
सही उत्तर: घ) 7
i takes the values 1, 2, 4, 8, 16, 32, 64; the next value 128 exceeds 100, so 7 iterations.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
How many times is "*" printed by: for (i = 0; i < 3; i++) for (j = 0; j < 4; j++) printf("*"); ?
सही उत्तर: ख) 12
The inner loop runs 4 times for each of the 3 outer iterations: 3 x 4 = 12.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which loop header creates an intentional infinite loop in C?
सही उत्तर: ग) for (;;)
A for loop with an empty condition is treated as always true, so for (;;) runs forever.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, what is the value of (int)-3.99 ?
सही उत्तर: ख) -3
Converting a floating value to int truncates toward zero, so -3.99 becomes -3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।