कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
१,५०२ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In C, the expression *p++ (where p is a pointer):
सही उत्तर: ग) yields the value p points to, then increments the pointer p
Postfix ++ binds tighter than *, so p++ is applied to the pointer; the old address is dereferenced and p then moves to the next element.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int i; for (i = 0; i < 5; i++) { if (i == 3) continue; printf("%d", i); }
सही उत्तर: घ) 0124
When i is 3, continue skips the printf; all other values 0, 1, 2, 4 are printed.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A recursive function that has no reachable base case will usually end in:
सही उत्तर: ग) a stack overflow
Each call adds a stack frame; without a base case, calls never stop until the call stack is exhausted.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: char *s = "Lok Sewa"; printf("%c", *(s + 4));
सही उत्तर: घ) S
Indexing from 0: L(0) o(1) k(2) space(3) S(4), so *(s + 4) is 'S'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
For a C function call swap(&x, &y) that exchanges two int variables, the function's parameters should be declared as:
सही उत्तर: घ) pointers to int (int *a, int *b)
Addresses are passed, so the parameters must be pointers to int; C has no reference parameters like int &a.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int a = 5, b = 10; int *p = &a, *q = &b; printf("%d", *q - *p);
सही उत्तर: क) 5
*q is 10 and *p is 5, so the expression evaluates 10 - 5 = 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given enum color {RED, GREEN = 5, BLUE}; in C, what is the value of BLUE?
सही उत्तर: घ) 6
Each enumerator without an explicit value is one more than the previous one, so BLUE = GREEN + 1 = 6.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C function writes formatted output to a file?
सही उत्तर: क) fprintf()
fprintf(fp, format, ...) works like printf() but writes to the file stream fp.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In most C implementations, the end-of-file marker EOF returned by functions such as getc() has the value:
सही उत्तर: क) -1
EOF is a negative int constant defined in stdio.h, almost always -1.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Opening an existing file with fopen() in "w" mode:
सही उत्तर: ग) erases (truncates) its existing contents
w mode truncates an existing file to zero length, or creates a new one.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।