कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Trace this C fragment and give its output: int a = 10, b = 3; float r = (float)a / b; printf("%.2f", r);
सही उत्तर: क) 3.33
The cast makes the division floating-point (10.0 / 3 = 3.333...), and %.2f prints it with two decimal places: 3.33.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: char *p = "Bagmati"; p += 3; printf("%s", p);
सही उत्तर: घ) mati
After p += 3, p points to the character at index 3 ('m'), so printing from there gives 'mati'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: int arr[] = {2, 4, 6, 8}; int *p = arr + 1; printf("%d", p[2]);
सही उत्तर: ग) 8
p points to arr[1], so p[2] is *(p + 2), which is arr[3] = 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: int x = 7; printf("%d", x % 3 == 1 ? x * 2 : x / 2);
सही उत्तर: ख) 14
7 % 3 is 1, so the condition is true and the value x * 2 = 14 is printed.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: int i, j; for (i = 1; i <= 3; i++) for (j = 1; j <= i; j++) printf("%d", j);
सही उत्तर: क) 112123
For i = 1 it prints 1, for i = 2 it prints 12, and for i = 3 it prints 123, giving 112123.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: int i, f = 1; for (i = 1; i <= 5; i += 2) f *= i; printf("%d", f);
सही उत्तर: घ) 15
i takes the values 1, 3 and 5, so f = 1 * 1 * 3 * 5 = 15.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: int x = 0xA; printf("%d", x ^ 6);
सही उत्तर: ग) 12
0xA is 10 (1010 in binary) and 6 is 0110; XOR gives 1100, which is 12.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: int a = 2, b = 3; printf("%d", a * b % 4 + b / a);
सही उत्तर: ख) 3
a * b % 4 = 6 % 4 = 2 and b / a = 3 / 2 = 1 (integer division), so the result is 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Trace this C fragment and give its output: printf("%d", 3 + 4 % 3 * 2 - 1);
सही उत्तर: क) 4
% and * have higher precedence than + and - and group left to right: 4 % 3 = 1, 1 * 2 = 2, then 3 + 2 - 1 = 4.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The Sieve of Eratosthenes is an algorithm for:
सही उत्तर: ख) finding all prime numbers up to a given limit
It repeatedly crosses out multiples of each prime, leaving only primes up to the limit.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।