कम्प्युटर / सूचना प्रविधि कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक
Computer Operator & Assistant · Computer & IT Posts
१,५०२ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In nested if statements in C, an else clause is associated with:
सही उत्तर: ख) the nearest preceding if that does not already have an else
This rule resolves the 'dangling else' ambiguity; braces can be used to pair an else with a different if.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The C do-while loop is written as do { ... } while (condition) and must end with:
सही उत्तर: ख) a semicolon after the closing parenthesis
Unlike the while loop, the do-while statement is terminated by a semicolon after while (condition).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which statement about the default label in a C switch statement is correct?
सही उत्तर: ग) It is optional and may be placed anywhere among the case labels
default is optional, may appear in any position, and is taken only when no case value matches.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int x = 3; switch (x) { default: printf("D"); case 1: printf("A"); break; case 2: printf("B"); } ?
सही उत्तर: घ) DA
No case matches 3, so control jumps to default and prints D; with no break it falls through to case 1, prints A, then breaks.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: int i = 5; while (i > 0) i -= 2; printf("%d", i); ?
सही उत्तर: घ) -1
i goes 5, 3, 1, -1; the loop stops when i becomes -1, which is then printed.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
How many times does the body of the C loop for (i = 1; i < 20; i = i * 3) execute?
सही उत्तर: ग) 3
i takes the values 1, 3 and 9; the next value 27 fails the test i < 20, so the body runs 3 times.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Following C operator precedence rules, 5 + 3 % 2 * 4 evaluates to:
सही उत्तर: ख) 9
% and * are evaluated before +, left to right: 3 % 2 = 1, 1 * 4 = 4, and 5 + 4 = 9.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, what is the value of the integer expression 7 / 2 * 2?
सही उत्तर: घ) 6
/ and * have equal precedence and associate left to right: 7 / 2 = 3 (integer division), then 3 * 2 = 6.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C, the assignment operator = associates from:
सही उत्तर: क) right to left, so a = b = c = 5 assigns 5 to c first
Assignment is right-associative, so a = b = c = 5 is evaluated as a = (b = (c = 5)).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
For an integer n in C, the expression (n & 1) is non-zero exactly when n is:
सही उत्तर: घ) odd
The lowest bit of an integer is 1 for odd numbers, so n & 1 is 1 for odd n and 0 for even n.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।