कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
१,५०२ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
When a two-dimensional array int a[3][4] is passed to a C function, the parameter must be declared with at least:
सही उत्तर: ग) the number of columns, for example int a[][4]
The compiler needs the column size to calculate the address of a[i][j]; only the first dimension may be omitted.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the call b(6), where void b(int n) { if (n > 1) b(n / 2); printf("%d", n % 2); } ?
सही उत्तर: क) 110
b(6) calls b(3), which calls b(1); b(1) prints 1, then b(3) prints 1 and b(6) prints 0, giving the binary form 110.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the call f(3), where void f(int n) { if (n > 0) { f(n - 1); printf("%d", n); } } ?
सही उत्तर: क) 123
Each call first recurses down to n = 0 and prints only while returning, so the output is 1, 2, 3 in that order.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given int g(int a, int b) { return b == 0 ? a : g(b, a % b); } what does g(48, 18) return?
सही उत्तर: ख) 6
g(48,18) -> g(18,12) -> g(12,6) -> g(6,0) = 6; this is Euclid's GCD algorithm.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given int p(int b, int e) { return e == 0 ? 1 : b * p(b, e - 1); } what does p(3, 4) return?
सही उत्तर: ख) 81
p computes b raised to e recursively: 3 x 3 x 3 x 3 x 1 = 81.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C99 header defines the macros bool, true and false?
सही उत्तर: घ) stdbool.h
Including <stdbool.h> lets programs write bool, true and false instead of _Bool, 1 and 0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C header file defines constants such as INT_MAX and CHAR_BIT?
सही उत्तर: ग) limits.h
<limits.h> defines the ranges of integer types, e.g. INT_MAX, INT_MIN and CHAR_BIT.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which relationship between the sizes of C integer types is guaranteed by the C standard?
सही उत्तर: ग) sizeof(short) <= sizeof(int) <= sizeof(long)
The standard fixes only minimum ranges and this ordering; actual sizes vary between platforms.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
On most modern systems, sizeof(double) in C is:
सही उत्तर: ख) 8 bytes
double is normally an IEEE 754 64-bit (8-byte) floating-point type.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, if an arithmetic operation on signed int values produces a result too large to represent, the behaviour is:
सही उत्तर: ग) undefined
Signed integer overflow is undefined behaviour in C, unlike unsigned arithmetic, which is defined to wrap modulo 2^n.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।