प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In C, the expression 5++ is invalid because:
सही उत्तर: घ) The operand of ++ must be a modifiable lvalue, and a constant is not
Increment needs an object that can be stored to; the literal 5 is not an lvalue, so the compiler reports an error.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
C is often called a middle-level language because it:
सही उत्तर: क) Combines high-level constructs with low-level features such as pointers and bit manipulation
C offers structured high-level syntax while also giving direct access to memory and hardware.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The classic book 'The C Programming Language' (often called K&R) was written by Dennis Ritchie and:
सही उत्तर: ग) Brian Kernighan
K&R stands for Brian Kernighan and Dennis Ritchie, the authors of the book first published in 1978.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The C language evolved from which earlier language created by Ken Thompson?
सही उत्तर: ग) B
Ken Thompson's B (derived from BCPL) was extended by Dennis Ritchie with data types to create C.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C function returns the absolute value of a double, and in which header is it declared?
सही उत्तर: क) fabs() in math.h
fabs() in math.h works on double; abs() in stdlib.h works on int.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, the function srand() is used to:
सही उत्तर: ख) Seed the pseudo-random number generator used by rand()
srand(seed) sets the starting point of the sequence produced by rand(); a common seed is time(NULL).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int x = 1; { int x = 2; } printf("%d", x); ?
सही उत्तर: घ) 1
The inner x is a separate variable whose scope ends at the closing brace; the printf uses the outer x, which is 1.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The default storage class of a variable declared inside a C function without any storage-class keyword is:
सही उत्तर: घ) auto
Local variables are automatic by default: created when the block is entered and destroyed when it is left.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
When a break statement is executed inside a switch that is itself inside a for loop, control passes to:
सही उत्तर: ख) The statement after the switch, and the loop continues
break exits only the innermost enclosing switch or loop, which here is the switch.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the value of i after: int i = 0; while (i < 10) i += 3; ?
सही उत्तर: ग) 12
i takes the values 0, 3, 6, 9, 12; when i = 12 the condition i < 10 fails and the loop ends.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।