कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is printed by the C code: unsigned int u = 0xF0; printf("%u", u >> 4); ?
सही उत्तर: घ) 15
0xF0 is 240 (binary 1111 0000); shifting right by 4 bits gives 1111, which is 15.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int a[3][3] = {{1,2,3},{4,5,6},{7,8,9}}, i, s = 0; for (i = 0; i < 3; i++) s += a[i][2]; printf("%d", s); ?
सही उत्तर: ग) 18
a[i][2] is the last element of each row: 3 + 6 + 9 = 18.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
On an ASCII system, what does printf("%d", strcmp("Zebra", "apple") < 0); print in C?
सही उत्तर: ग) 1
strcmp compares character codes; 'Z' (90) is less than 'a' (97), so the result is negative and the comparison is true (1).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: char str[20]; strcpy(str, "Hello"); strcat(str, " World"); printf("%d", (int)strlen(str)); ?
सही उत्तर: ख) 11
After strcat the string is "Hello World", which has 11 characters (strlen does not count the '\0').
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which output does printf("%.2f", 10 / 4.0); produce in C?
सही उत्तर: ग) 2.50
Because 4.0 is a double, floating-point division gives 2.5, printed with two decimal places as 2.50.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The C statement printf("%d", (int)(2.9 + 3.9)); outputs:
सही उत्तर: घ) 6
2.9 + 3.9 = 6.8, and the cast to int truncates towards zero, giving 6.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int n = 100, c = 0; while (n % 2 == 0) { n /= 2; c++; } printf("%d %d", c, n); ?
सही उत्तर: ख) 2 25
100 / 2 = 50 and 50 / 2 = 25; 25 is odd, so the loop stops after 2 divisions with n = 25.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int i, c = 0; for (i = 1; i <= 100; i++) if (i % 3 == 0 && i % 5 == 0) c++; printf("%d", c); ?
सही उत्तर: ग) 6
Numbers divisible by both 3 and 5 are multiples of 15: 15, 30, 45, 60, 75, 90, so there are 6.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int a[5] = {1, 2, 3, 4, 5}; int *p = a + 4; printf("%d", *p - *(p - 3)); ?
सही उत्तर: ख) 3
p points to a[4] = 5 and p - 3 points to a[1] = 2, so 5 - 2 = 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int a = 10, b = 20; int *p = &a, *q = &b; *p = *p + *q; p = q; *p = 5; printf("%d %d", a, b); ?
सही उत्तर: घ) 30 5
First a becomes 10 + 20 = 30; then p is made to point to b, so *p = 5 changes b to 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।