कम्प्युटर / सूचना प्रविधि कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक
Computer Operator & Assistant · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
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 *.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A pointer that still points to a memory location that has already been freed is called a:
सही उत्तर: क) dangling pointer
After free(), the pointer still holds the old address but the memory is no longer valid, making it dangling.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which value is conventionally assigned to a C pointer to show that it does not point to any valid object?
सही उत्तर: क) NULL
A null pointer (NULL) indicates the pointer points to nothing.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In most C expressions, the name of an array is converted into:
सही उत्तर: ख) a pointer to its first element
An array name decays to the address of its first element, e.g. a is equivalent to &a[0].
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
An int pointer p holds the address 1000 and sizeof(int) is 4. What address does p + 1 refer to?
सही उत्तर: ग) 1004
Pointer arithmetic scales by the size of the pointed-to type: 1000 + 1 x 4 = 1004.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Given int a[5] = {10, 20, 30, 40, 50}; int *p = a; what is the value of *(p + 2)?
सही उत्तर: क) 30
p points to a[0]; p + 2 points to a[2], whose value is 30.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।