कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Given union u { int i; double d; char c; }; with int = 4 bytes and double = 8 bytes, sizeof(union u) is:
सही उत्तर: ग) 8
All members of a union share the same memory, so its size is that of the largest member (the 8-byte double).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The C declaration int * const p = &x; means that:
सही उत्तर: क) p must always point to x, but the value of x can be changed through p
Here const applies to the pointer itself, so p cannot be reassigned, while *p = 5 is allowed.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A pointer variable that has been declared but never initialised, so it holds an arbitrary address, is called a:
सही उत्तर: ख) wild pointer
A wild pointer contains a garbage address; using it causes unpredictable behaviour.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int a[] = {1, 2, 3, 4}; int *p = a; p++; printf("%d", *p + 1); ?
सही उत्तर: क) 3
After p++, p points to a[1] = 2; *p + 1 = 3 (the dereference happens before the addition).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, executing char *p = "Hello"; p[0] = 'J'; results in:
सही उत्तर: ग) undefined behaviour, because string literals must not be modified
String literals may be stored in read-only memory; modifying one is undefined behaviour and often crashes.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which header file declares character-handling functions such as toupper() and isdigit() in C?
सही उत्तर: क) ctype.h
ctype.h contains character classification and conversion functions.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The C library function atoi() is used to:
सही उत्तर: घ) convert a string of digits to an int
atoi("123") returns the integer 123; it is declared in stdlib.h.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, given char s[20] = "Hi"; what is the value of sizeof(s)?
सही उत्तर: ग) 20
sizeof gives the size of the whole array (20 bytes), while strlen(s) would give 2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, what does strcmp("apple", "banana") return?
सही उत्तर: ग) a negative value
'a' comes before 'b', so the first string is lexically smaller and strcmp returns a negative value.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C standard library function reads a single character from standard input?
सही उत्तर: ख) getchar()
getchar() reads one character from stdin; putchar() writes one character.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।