कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
१,५०२ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Which fopen() mode opens a text file for writing at the end of its existing contents?
सही उत्तर: घ) a
Mode a (append) writes at the end of the file, creating it if it does not exist.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, the elements of a two-dimensional array are stored in memory in:
सही उत्तर: क) row-major order
C stores a 2-D array row by row: all of row 0, then row 1, and so on.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, if sizeof(int) is 4, how many bytes does the array int a[3][4]; occupy?
सही उत्तर: ग) 48
The array has 3 x 4 = 12 elements, each 4 bytes, so 12 x 4 = 48 bytes.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int x = 10; int *p = &x; *p = 20; printf("%d", x);
सही उत्तर: ग) 20
*p refers to x itself, so assigning 20 through the pointer changes x to 20.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which is the correct meaning of the C declaration int (*p)[5]; ?
सही उत्तर: घ) a pointer to an array of 5 ints
The parentheses make p a pointer first; what it points to is an array of 5 ints.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, the declaration int *p[5]; declares p as:
सही उत्तर: ख) an array of 5 pointers to int
[] binds tighter than *, so p is an array of 5 elements, each of type int *.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Repeatedly allocating dynamic memory and never freeing it when it is no longer needed causes a:
सही उत्तर: ख) memory leak
Unreleased heap memory becomes unusable for the rest of the program's life, which is a memory leak.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C library function changes the size of a previously allocated block of dynamic memory?
सही उत्तर: क) realloc()
realloc(ptr, newsize) resizes the block, moving it if necessary.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
How does calloc() differ from malloc() in C?
सही उत्तर: क) calloc() initialises the allocated memory to zero
calloc(n, size) allocates n x size bytes and sets them to zero; malloc(size) leaves the memory uninitialised.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A void pointer (void *) in C:
सही उत्तर: घ) can hold the address of any data type but must be cast before dereferencing
void * is a generic pointer; since its target type is unknown, it must be cast to a specific type before use with *.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।