Monday 2 September 2019

Programming Language C PGT Teacher’s Computer Science Previous Year Papers Solved Questions (English & Hindi Edition)

PGT कंप्यूटर साइंस प्रीवियस पेपर्स
PGT Teacher’s Computer Science Previous Year Papers Solved Questions
(English & Hindi Edition)

MCQ
Chapter 4. 
Programming Language 'C'




1. The conditional operator (?:) is also known as सप्रतिबंध संकारक (?:) को निम्नलिखित संकारक भी कहा जाता है
(a) loop operator/लूप संकारक
(b) control operator/कंट्रोल संकारक
(c) case operator/केस संकारक
(d) ternary operator/टर्नरी संकारक
Ans: (d)

2. Which of the following operators is used for making comparison between different operands?
विभिन्न संकायों के बीच तुलना करने के लिए निम्नलिखित संकारक का प्रयोग किया जाता है
(a) Logical operator/तार्किक संकारक
(b) Relational operator/संबंधपरक संकारक
(c) Arithmetic operator/अंकगणितीय संकारक
(d) Assignment operator/निर्धारण संकारक
Ans: (b)

3. Which of the following statements is used to make a selection from more than two choices?
दो से अधिक विकल्पों में से चयन करने के लिए निम्नलिखित में से किस कथन का प्रयोग किया जाता है?
(a) if-else (b) switch
(c) else-if (d) None of these/इनमें से कोई नहीं
Ans: (b)

4. C' & 'C++' languages are the example of...........
C' और 'C++' भाषाएं ..............के उदाहरण हैं-
(a) First Generation Programming Languages.
प्रथम पीढ़ी प्रोग्रामिंग भाषा
(b) Second Generation Programming Languages द्वितीय पीढ़ी प्रोग्रामिंग भाषा
(c) Third Generation Programming Lanuages.
तृतीय पीढ़ी प्रोग्रामिंग भाषा
(d) Fourth Generation Programming Languages.
चतुर्थ पीढ़ी प्रोग्रामिंग भाषा
Ans: (c)

5. What would be the output of the following program if input to the program is 'e' ?
यदि प्रोग्राम में इनपुट 'e' है तो निम्न प्रोग्राम का आउटपुट क्या होगा?
main () { int lower, upper; upper = getchar (); upper = toupper(lower); putchar(upper); }
(a) e (b) 53
(c) E (d) nothing / कुछ भी नहीं
Ans: (c)

6. It S is an array of 80 characters, then the value assigned to S through the statement scanf("%s", S) with input 12345, will be:
S 80 कैरेक्टर्स की एक सारणी है‚ तो कथन scanf("%s", S) के माध्यम से S को आवंटित मान। इनपुट 12345 होगा:
(a) "12345"
(b) S is an illegal name for a string S एक स्ट्रिंग के लिए एक अवैध नाम है
(c) nothing since 12345 is an integer 12345 के बाद से कोई भी पूर्णांक नहीं है
(d) %s cannot be used for reading in values of S.
S के मूल्यों में पढ़ने के लिए %S का उपयोग नहीं किया जा सकता
Ans: (a)

7. 1: typedef long a; extern int a c; 2: typedef long a; extern a int c; 3: typedef long a; extern a c;
(a) 1correct / 1 सही है
(b) 2 correct / 2 सही है
(c) 3 correct / 3 सही है
(d) 1, 2, 3 are correct / 1‚ 2‚ 3 सही है
Ans: (c)

8. Identify the most appropriate sentence to describe unions:
यूनियनों का वर्णन करने के लिए सबसे उचित वाक्य की पहचान करें
(a) Unions are used for set operations यूनियनों को उपयोग सेट ऑपरेशंस के लिए उपयोग किया जाता है
(b) Unions contain members of different data types which share the same storage area in memory यूनियनों में विभिन्न डेटा प्रकारों के सदस्य होते हैं‚ जो समान भंडारण क्षेत्र को मेमोरी में साझा करते हैं
(c) Unions are less frequently used in programs प्रोग्रामों में यूनियन का अक्सर उपयोग नहीं किया जाता है
(d) Unions are like structures यूनियन संरचनाओं की तरह है
Ans: (b)

9. Which of the following 'C' type is not a primitive data structure ?
निम्नलिखित में से कौन-सा 'C' प्रकार एक प्रीमिटिव डेटा स्ट्रक्चर नहीं है?
(a) float
(b) int
(c) char
(d) none of the above / उपर्युक्त सभी
Ans: (d)

10. The strategy of allowing processes that are logically runnable to be temporarily suspended is called:
अस्थायी रूप से निलम्बित होने के लिए तर्कसंगत रूप से चलने वाली प्रक्रियाओं को अनुमति देने की रणनीति को कहा जाता है:
(a) premptive scheduling प्रीमिटिव शेड्‌यूलिंग
(b) non premptive scheduling नॉन प्रीमिटिव शेड्‌यूलिंग
(c) shortest job first सबसे छोटी जॉब पहले
(d) first come first served पहले आओ पहले पाओ
Ans: (a)

11. The library function exit() causes an exit from:
लाइब्रेरी फंक्शन निकास से बाहर निकलने का कारण बनता है
(a) the functions in which, it occurs फंक्शन जिसमें‚ यह होता है
(b) the block in which, it occurs ब्लॉक जिसमें यह होता है
(c) the loop in which, it occurs लूप जिसमें यह होता है
(d) None of these / इनमें से कोई नहीं
Ans: (d)

12. The getch() library function:
getch लाइब्रेरी फंक्शन
(a) returns and displays a character on the screen when any key is pressed किसी भी ‘‘की’’ को दबाने पर स्क्रीन पर एक कैरेक्टर देता है और प्रदर्शित करता है
(b) returns a character when enter is pressed इंटर किए जाने पर एक कैरेक्टर लौटाता है
(c) returns a character when any key is pressed किसी भी ‘‘की’’ को प्रेस किए जाने पर एक कैरेक्टर देता है
(d) None of the above / उपर्युक्त में से कोई नहीं
Ans: (b)

13. A default argument has a value that:
एक डिफॉल्ट तर्क में एक मान है कि:
(a) may be supplied by the calling program or function / कॉलिंग प्रोग्राम या फंक्शन द्वारा आपूर्ति की जा सकती है
(b) integers with user defined names यूजर डिफाइन नाम के साथ पूर्णांक
(c) related data items and variables सम्बन्धित डेटा आइटम और चर
(d) None of these / इनमें से कोई नहीं
Ans: (a)

14. What is the output of the following C program code? निम्नलिखित C प्रोग्राम कोड का आउटपुट क्या है?
int i = 0; for (; i < = 5; i++); printf ("%d", i);
(a) 0, 1, 2, 4, 5 (b) 6
(c) 5 (d) 1,2,3,4,5
Ans: (b)

15. What is the output of the following C program code?/ निम्नलिखित C क्रमादेश कोड का आउटपुट क्या है?
for (i = 1 ; i < 5; i + = 3) {} printf ("%d", i);
(a) 1
(b) 4
(c) 7
(d) Syntax error/वाक्य रचना त्रुटि
Ans: (d)

16. Which of the following is a collection of different elements having similar data type?
समान डाटा किस्मों वाले भिन्न-भिन्न अवयवों का संग्रहण कहलाता है?
(a) Array/आव्यूह (b) Structrue/संरचना
(c) Union/यूनियन (d) Pointer/प्वाइंटर
Ans: (a)

17. A structure brings together a group of:
एक संरचना एक समूह के साथ लाता है
(a) integers with user–defined names यूजर डिफाइन नाम के साथ पूर्णांक
(b) related data items and variables सम्बन्धित डेटा आइटम और चर
(c) items of the same data type एक ही डेटा प्रकार के आइटम
(d) None of these / इनमें से कोई नहीं
Ans: (b)

18. The && and operators:
&& और ऑपरेटर्स:
(a) combine two numeric values दो संख्यात्मक मानों को मिलाएँ
(b) compare two numeric values दो संख्यात्मक मानों की तुलना करें
(c) compare two Boolean values दो बूलियन मानों की तुलना करें
(d) perform none of the above उपर्युक्त में से कोई भी प्रदर्शन नहीं करें
Ans: (c)

19. The break statement causes an exit:
ब्रेक स्टेटमेंट बाहर निकलने का कारण बनता है:
(a) only from the innermost switch केवल सबसे निचले स्विच से
(b) only from the innermost loop केवल सबसे निचले लूप से
(c) from the innermost loop or switch सबसे निचले लूप या स्विच से
(d) None of the above / उपर्युक्त में से कोई नहीं
Ans: (c)

20. Consider the following program:
निम्नलिखित प्रोग्राम पर विचार करें− main () { int c = 50; for(; c;) c--; printf("%d\n",c); } The output of the program will be:
प्रोग्राम का आउटपुट होगा:
(a) –50
(b) 50
(c) 0
(d) None of these / इनमें से कोई नहीं
Ans: (c)

21. Consider the following program निम्नलिखित प्रोग्राम पर विचार करें:
main () { int x = 0, i, j; for (i = 0, j = 10; i < 5, j > 0; i + =2, j--) ++x; printf("%d",x); } The output of the above program will be उपर्युक्त प्रोग्राम का आउटपुट होगा
(a) 10
(b) 0
(c) 5
(d) None of the above / उपर्युक्त में से कोई नहीं
Ans: (a)

22. In which stage the following code निम्नलिखित कोड किस स्टेज में #include<stdio.h> gets replaced by the contents of the file stdio.h फाइल stdio.h की सामग्री द्वारा प्रतिस्थापित किया जाता है
(a) During editing / संपादन के दौरान
(b) During linking / लिंकिंग के दौरान
(c) During execution / निष्पादन के दौरान
(d) During preprocessing / प्रीप्रोसेसिंग के दौरान
Ans: (d)

23. Enumeration variables can be used in:
गणना चर का उपयोग इस प्रकार किया जा सकता है:
(a) search statement like a integer variable एक पूर्णांक चर की तरह खोज विवरण
(b) preprocessor commands / प्री प्रोसेसर कमांड्‌स
(c) break statement / ब्रेक स्टेटमेंट
(d) All of the above / उपर्युक्त सभी
Ans: (a)

24. # define preprocessor command can be used for defining:
# परिभाषित करने के लिए प्रीप्रोसेसर कमांड का उपयोग किया जा सकता है:
(a) symbolic constants / प्रतीकात्मक स्थिरांक
(b) macros / मैक्रो़ज
(c) for loop / लूप के लिए
(d) both (a) and (c) / (a) और (c) दोनों
Ans: (d)

25. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array ?
क्या होगा यदि C प्रोग्राम में आप किसी सारणी तत्व का मान निर्दिष्ट करते हैं‚ जिसका subscript सारणी के आकार से अधिक है?
(a) The element will be set to 0.
तत्व 0 पर सेट किया जाएगा
(b) The compiler would report an error कम्पाइलर एक त्रुटि की रिपोर्ट करेगा
(c) The program may crash if some important data gets overwritten यदि कुछ महत्वपूर्ण डेटा ओवरराइट हो जाता है तो प्रोग्राम क्रैश हो सकता है
(d) The array size would appropriately grow सारणी का आकार उचित रूप से बढ़ेगा
Ans: (c)

26. Which of the following is a pointer variable in C?
C में प्वाइंटर परिवर्ती निम्नलिखित में से कौन सा है?
(a) int P; (b) Char P;
(c) int * P; (d) int & P;
Ans: (c)

27. Which of the following statements about High-
Level language is correct?
उच्च-स्तरीय भाषा के सम्बन्ध में निम्नलिखित में से कौन-सा कथन सही है?
(a) High-Level language is machine dependent/ हाई-लेवल लैंग्वेज मशीन लैंवेज पर निर्भर करता है
(b) High-Level language is machine independent हाई-लेवल लैंग्वेज मशीन लैंग्वेज पर निर्भर नहीं करता है
(c) High-Level language is difficult than Assembly हाई-लेवल लैंग्वेज असेम्बली लैंग्वेज से कठिन होता है
(d) High-Level language programs require Assembler/हाई-लेवल लैंग्वेज प्रोग्राम के लिए असेम्बलर की आवश्यकता होती है
Ans: (b)

28. In C, if you pass an array as an argument to a function, what actually gets passed ?
C में‚ यदि आप किसी फंक्शन को तर्क के रूप में एक सारणी पास करते हैं‚ तो वास्तव में क्या पारित हो जाता है?
(a) Value of elements in array सारणी के तत्व का मूल्य
(b) First element of the array सारणी का पहला तत्व
(c) Base address of the array सारणी का आधार पता
(d) Address of the last element of array सारणी के अन्तिम तत्व का पता
Ans: (c)

29. What is (void*) 0 ?
(void*) 0 क्या है?
(a) Representation of NULL pointer NULL प्वाइंट का प्रतिनिधित्व
(b) Representation of void pointer void प्वाइंटर का प्रतिनिधित्व
(c) Error / त्रुटि
(d) None of above / उपर्युक्त में से कोई नहीं
Ans: (a)

30. In which header file is the NULL macro defined?
किस हेडर फाइल में NULL मैक्रो परिभाषित किया गया है?
(a) stdio.h (b) stddef.h
(c) stdio.h and stddef.h (d) stdlib.h
Ans: (c)

31. The value of an automatic variable that is declared but not initialized will be:
एक ऑटोमैटिक वैरिएबल का मान घोषित है‚ लेकिन इसे प्रारम्भ नहीं किया जाएगा:
(a) 0
(b) –1
(c) unpredictable / अप्रत्याशित
(d) None of the above / उपर्युक्त में से कोई नहीं
Ans: (c)

32. Which of the following operators takes only integer operands ?
(a) + (b) ×
(c) / (d) %
Ans: (d)

33. Length of the string "correct" is:
"Correct" स्ट्रिंग की लम्बाई है:
(a) 7
(b) 8
(c) 6
(d) Implementation dependant कार्यान्वयन आधारित
Ans: (a)

34. In the programming language C:
प्रोग्रामिंग भाषा ‘सी’ में:
(a) variable names are case–sensitive वैरिएबल नेम केश सेंसिटिव
(b) blanks can be given within a variable name रिक्त स्थान एक चर नाम के भीतर दिया जा सकता है
(c) there are no reserved words, which are not allowed as variable names कोई आरक्षित शब्द नहीं है‚ जिन्हें चर (वैरिएबल) नामों के रूप में अनुमति नहीं है
(d) None of the above / उपर्युक्त में से कोई नहीं
Ans: (a)

35. The include directive in C is used to:
C में Include directive में शामिल किया जाता है
(a) specify a list of files from where data will be read at the time of execution फाइलों की एक सूची निर्दिष्ट करें जहाँ से निष्पादन के समय डेटा पढ़ा जाएगा
(b) include header files in a program एक कार्यक्रम में हेडर फाइलें शामिल है
(c) link other object modules to the current program at the time of compilation संकलन के समय वर्तमान प्रोग्राम में अन्य ऑब्जेक्ट मॉड्‌यूल को लिंक करें
(d) None of the above / उपर्युक्त सभी
Ans: (b)

36. A diamond–shaped box in a flow chart refers to:
एक प्रवाह चार्ट में एक हीरे के आकार का बॉक्स सम्बन्धित है:
(a) data input from a device इस डिवाइस से डेटा इनपुट
(b) printing of a file एक फाइल की प्रिंटिंग
(c) an if–then–else decision
(d) an assignment statement एक असाइनमेंट स्टेटमेंट
Ans: (c)

37. Which one of the following violates the principles of structured programming ?
निम्न में से कौन-सा संरचित प्रोग्रामिंग के सिद्धान्तों का उल्लंघन करता है?
(a) The use of "do while" statements "do while" कथन का उपयोग करते हैं
(b) The use of "go to" statements in a program एक प्रोग्राम में "go to" कथन का प्रयोग करते हैं
(c) The use of global variables वैश्विक चर का उपयोग करते हैं
(d) The use of recursive procedures रिकर्सिव (पुनरावर्ती) प्रक्रिया का उपयोग
Ans: (b)

38. Which one of the following statements is true after execution of the program निम्न में से कौन-सा कथन सत्य है प्रोग्राम को निष्पादित करने के लिए int a[10], I, *p; a[0] = 1; a[1] = 2; p = a;
(*p)++;
(a) a[0] = 2 (b) a[1] = 3
(c) a[1] = 2 (d) all
Ans: (c)

39. It is necessary to declare the type of a function in the calling program if:
यदि कॉलिंग (calling) प्रोग्राम में फंक्शन के प्रकार की घोषणा करना आवश्यक होता है
(a) the function returns an integer फंक्शन एक पूर्णांक देता है
(b) the function returns a non–integer value फंक्शन एक गैर-पूर्णांक मान देता है।
(c) the function is not defined in the same file एक ही फाइल में फंक्शन परिभाषित नहीं होता है।
(d) None of the above / उपरोक्त में से कोई नहीं
Ans: (b)

40. Consider the following program fragment:
निम्नलिखित प्रोग्राम खण्ड (fragment) पर विचार करें:
main() { int a, b, c; b = 2; a = 2* (b++); c = 2* (++b); } Which one of the given answer is correct ?
निम्न में से कौन एक सही है।
(a) a = 4, c = 6 (b) a = 3, c = 8
(c) b = 3, c = 6 (d) a = 4, c = 8
Ans: (d)

41. Given the following program fragment, which one of the alternatives is correct ?
main() निम्नलिखित कार्यक्रम (program) खण्ड (fragment) को देखते हुए कौन-सा सही है { char status; int balance; balance = 1000; status = (balance > = 1000) ? 'C': 'O'; }
(a) status = 'O' (b) status = 'C'
(c) status = O; (d) status = NIL
Ans: (b)

42. What will be the value of the sum after the following program is executed ?
main() निम्नलिखित प्रोग्राम निष्पादित होने के बाद राशि
(sum) का मान क्या होगा { int sum, index, sum = 1; index = 9; do { index = index –1; sum = 2* sum; } while (index >9);
(a) 1 (b) 2
(c) 9 (d) 0.5
Ans: (b)

43. How many times will the print statement be executed ?
प्रिंट कथन (statement) कितनी बार निष्पादित किया जाएगा। main() { int n; n = 10; while (n < 10) { printf ("hello ") ; – – n; } }
(a) never / कभी नहीं (b) once / एक बार
(c) 10 (d) 9
Ans: (a)

44. What is the final value of digit ?
अंक (डिजिट) का अन्तिम मान क्या होगा main() { int digit; for (digit = 0; digit < = 9; ++digit) printf ("%d\n", digit); digit = 2*digit; - - digit; }
(a) 19 (b) –1
(c) 17 (d) 16
Ans: (a)

45. The following program fragment:
दिया गया प्रोग्राम खण्ड देगा { int sum, index; index = 50; while(index >= 0) { sum = sum / index; – index; } }
(a) will give a run time error /रन समय में त्रुटि देगा
(b) will give a compilation error /संकलन त्रुटि देगा
(c) will give a linking error /एक लिंकिंग त्रुटि देगा
(d) none of the above /उपरोक्त में से कोई नहीं
Ans: (a)

46. What is the following program doing ?
निम्नलिखित दिया गया प्रोग्राम क्या करेगा main() { int digit = 0; do printf("%d\n", digit++); while (digit <=9);
(a) Adding 9 integer 9 पूर्णांकों को जोड़ेगा
(b) Adding integers from 1 to 9 1 से 9 तक के पूर्णांकों को जोड़ेगा
(c) Displaying any 9 integers 9 पूर्णांकों में से किसी को प्रदर्शित करेगा
(d) Displaying integers from 1 to 9 1 से 9 तक पूर्णांकों को प्रदर्शित करेगा
Ans: (d)

47. Consider the program fragment दिये गये प्रोग्राम खण्ड पर विचार करें switch (choice) { case 'R': printf("RED"); case 'W': printf("WHITE"); case 'B': printf("BLUE"); default: printf("ERROR"); break; } What would be the output if choice = 'R'?
आउटपुट क्या होगा यदि choice = 'R'?
(a) RED / रेड
(b) RED ERROR / रेड ऐरर
(c) RED WHITE BLUE ERROR रेड व्हाइट ब्लू ऐरर
(d) RED WHITE BLUE रेड व्हाइट ब्लू
Ans: (c)

48. What will be the output of the following program fragment ?
निम्नलिखित प्रोग्राम खण्ड (fragment) का उत्पादन क्या होगा?
{ int i = 12345 float x = 145.678; print("%3d,%5d,%8d", i, i, i); }
(a) 1 2 3
(b) 12345 12345 12345
(c) 12345
(d) 123 123 123
Ans: (b)

49. How many times, will the following loop be executed ?
दिया गया लूप कितनी बार निस्पादित होगा c1 = 'a'; while (c1 >= 'a' && c1 <='z') { c1 ++; }
(a) 0 (b) 26
(c) 25 (d) 1
Ans: (b)

50. What is the following function computing ?
निम्नलिखित फंक्शन कम्प्यूटिंग क्या है?
test (n) int n; { int i; long int prod = 1; if (n > 1) for (i = 2; i < = n; i++) prod * = i; return(prod); }
(a) It checks whether n is a non–negative integer यह जाँचता है कि n एक गैर ऋणात्मक पूर्णांक है या नहीं
(b) It calculates the value of factorial n यह फैक्टोरियल n के मान की गणना करेगा
(c) It calculates the product to any n positive integers / यह कोई n धनात्मक पूर्णांकों के गुणन की गणना करेगा
(d) None of these / उपरोक्त में से कोई नहीं
Ans: (b)

51. What will be the output of the following program ?
दिये गये प्रोग्राम का आउटपुट क्या होगा { int i = 1234; j = 0177, k = 0xa08c; printf("%8dx\n",i,j,k); }
(a) 1234 1777 a08c (b) 0000 1234 01aa ax
(c) 1234 1abc a08c (d) 1234 0777 ao8o
Ans: (a)

52. What would be the value of c ?
c का मान क्या होगा− { int c; float a, b; a = 245.05; b = 40.02; c = a + b; }
(a) 285.0 (b) 285.07
(c) 2850 (d) 285
Ans: (d)

53. How many times will the following loop be executed ?
दिया गया लूप कितनी बार निष्पादित होगा { x = 5; if (x = 1) {:
x ++; }
(a) Once / एक बार
(b) Never / कभी नहीं
(c) Five times / पाँच बार
(d) Infinitely many times / अनन्त बार
Ans: (d)

54. if (i > 1) c = 2; else c = 3; switch (c) { case 2: printf("CAUTION"); break; case 3: printf("GOOD BYE"); break; default: printf("ERROR"); } What is the output if i = 3?
यदि i = 3 हो तो आउटपुट क्या होगा
(a) CAUTION (b) ERROR
(c) GOOD BYE (d) default
Ans: (a)

55. What is the value of u1 and u2 ?
u1 और u2 int u1, u2; int v = 3; int *pv; u1 = 2*(v+5); pv = &v; u2 = 2*(*pv + 5);
(a) u1 = 16, u2 = 16 (b) u1= 16, u2 = 3
(c) u1 = 8, u2 = 16 (d) u1 = 8, u2 = 3
Ans: (a)

56. Which of the following statement is not true in context of strings in C language ?
C लैंग्वेज में स्ट्रिम्स के सन्दर्भ में निम्न में से कौन-सा कथन सत्य नहीं है?
(a) It is array of characters
(b) Last character of character array is always '/o'
(c) C inserts the null character automatical1ly
(d) Any string in C can be read by the function getchar ()
Ans: (d)

57. In C++ a function contained with in a class is called:
C++ में एक वर्ग में निहित फंक्शन को कहा जाता है।
(a) Member function/एक क्लास फंक्शन
(b) A class functions/एक क्लास फंक्शन
(c) An operator/एक ऑपरेटर
(d) A method/एक विधि
Ans: (a)

58. Which of the following statement is false in context of constructors in C++ ?
C++ में रचनाकारों के सन्दर्भ में निम्न में से कौन-सा गलत है?
(a) A constructor is a special member function whose task is to initialize the objects of its class/कन्स्ट्रक्शन एक विशेष सदस्य फंक्शन होता है जिसका कार्य क्लास के आब्जेक्ट को आदेश करना है
(b) Its name is the same as the class name इसका नाम क्लास के नाम के समान है
(c) The constructor is invoked whenever an object of its as sociated class is created जब भी इसके सम्बन्धित वर्ग की वस्तु बनायी जाती है तो कन्स्ट्रक्शन को बुलाया जाता है
(d) It is also used to destroy the objects/इसका उपयोग आब्जेक्ट को नष्ट करने के लिए होता है
Ans: (d)

59. Which of the following might be output as result of using a CASE tool ?
उपकरण का उपयोग करने के परिणामस्वरूप निम्न में से कौन-सा आउटपुट हो सकता है
(a) Programmable Code/प्रोग्राम करने योग्य कोड
(b) Flowcharts and data flow diagrams फ्लोचार्ट और डेटा फ्लो आरेख
(c) Prototypes and Cost/benefit analysis प्रोटोटाइप और लागत लाभ विश्लेषण
(d) All of the above/उपरोक्त सभी
Ans: (d)

60. If switch feature is used, then:
यदि स्विच सुविधा का प्रयोग किया जाता है‚ तब
(a) default case must be present डिफॉल्ट केस मौजूद होना चाहिए
(b) default case, if used, should be the last case डिफॉल्ट केस‚ यदि इस्तेमाल किया जाता है‚ तो अन्तिम केस होना चाहिए
(c) 'default' case, if use, can be placed anywhere डिफॉल्ट केस‚ यदि उपयोग करें‚ कहीं भी रखा जा सकता है
(d) none of the above / उपर्युक्त में से कोई नहीं
Ans: (c)

61. Which of the following comments about for loop are correct ?
लूप के बारे में निम्नलिखित में से कौन-सी टिप्पणियाँ सही हैं?
(a) Index value is retained outside the loop इंडेक्स वैल्यू लूप के बाहर बनाए रखा है
(b) Index value can be changed from within the loop लूप के भीतर से इंडेक्स वैल्यू बदला जा सकता है
(c) goto can be used to jump, out of the loop लूप से बाहर जाने के लिए गोटू (goto) का उपयोग किया जा सकता है
(d) All of the above / उपर्युक्त सभी
Ans: (d)

62. Choose the correct answers:
सही उत्तरों को चुनें:
(a) for loops can be nested फॉर लूप नेस्टेड हो सकता है
(b) Nested for loop may use the same index नेस्टेड फॉर लूप एक ही इंडेक्स का उपयोग कर सकते हैं
(c) Both of the above / उपर्युक्त दोनों
(d) None of the above / उपर्युक्त में से कोई नहीं
Ans: (a)

63. In a for loop if the condition is missing, then infinite looping can be avoided by a:
फॉर लूप में यदि कन्डीशन मिशिंग हो तो‚ अनंत लूपिंग से बचा जा सकता है
(a) goto statement / गोटू स्टेटमेन्ट से
(b) break statement / ब्रेक स्टेटमेन्ट से
(c) return statement / रिटर्न स्टेटमेन्ट
(d) all of the above / उपर्युक्त सभी
Ans: (d)

64. Which of the following concepts can be used to identify loops ?
लूप की पहचान करने के लिए निम्नलिखित में से कौन-सी अवधारणाओं का उपयोग किया जा सकता है?
(a) Dominators / डोमिनेटर्स
(b) Reducible graphs / कमजोर ग्राफ
(c) Depth first ordering / डेप्थ फस्ट ऑर्डरिंग
(d) All of the above / उपर्युक्त सभी
Ans: (d)

65. Initialization cannot be a part of the definition if the storage class of the array is:
यदि ऐरे ------ स्टोरेज क्लास है तो प्रारम्भिकरण
(initialization) परिभाषा (definition) का भाग नहीं हो सकता है।
(a) static / स्टैटिक
(b) external / इक्सटर्नल
(c) automatic / ऑटोमेटिक
(d) none of the above / उपरोक्त में से कोई नहीं
Ans: (c)

66. Pick the correct answers:
सही उत्तर का चुनाव करें:
(a) During array declaration, no storage is set aside ऐरे घोषणा के दौरान‚ कोई भण्डारण अलग नहीं किया जाता है
(b) Array definition precedes array declaration घोषित ऐरे परिभाषित ऐरे से पहले है
(c) Array declaration precedes array definition ऐरे की घोषणा ऐरे परिभाषा से पहले है
(d) Both (a) and (b) only are correct दोनों (a) तथा (b) सही है
Ans: (d)

67. Dynamic storage allocations cannot be used in C without:
गतिशील स्टोरेज आवंटन का उपयोग C के बगैर नहीं किया जा सकता है:
(a) files / फाइल
(b) unions / यूनियन
(c) pointers / प्वाइंटर
(d) enumerated data types / इनुमैरेटेड डाटा टाइप
Ans: (c)

68. In C, it is best to implement chained hash table as an array of:
C में चैन्ड हैश तालिका की एक सारणी के रूप में लागू करना सबसे अच्छा है:
(a) structures / संरचना
(b) string / स्ट्रींग
(c) pointers / प्वाइंटर
(d) None of these / इनमें से कोई नहीं
Ans: (c)

69. In C, strings are stored in a/an:
C में स्ट्रीम संग्रहीत होती है:
(a) linked list of unsigned characters अनसाइंड कैरेक्टर की लिंक्ड सूची
(b) linked list of characters कैरेक्टर की लिंक्ड सूची
(c) array of characters/कैरेक्टर की सारणी
(d) array of integers/इंटीजर की सारणी
Ans: (c)

70. Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms ?
कौन-सा कथन गारवेज संग्रह और अतिक्रमण तंत्र
(finalization mechanisms) के गारंटेड व्यवहार का वर्णन करते हैं?
Select all the valid answers सभी वैध उत्तरों का चयन करें
(a) The finalise () method will eventually be called on every object finalise () विधि अंतत: सभी ऑब्जेक्ट पर लगाया जाएगा।
(b) Objects are deleted when they can do longer be accessed through any reference ऑब्जेक्ट हटा दिए जाते हैं जब वे किसी संदर्भ के माध्यम से लम्बे समय तक पहुँचा जा सकता है
(c) The finalize() method will never be called more than once on an object किसी ऑब्जेक्ट पर अन्तिम रूप से एक बार से अधिक बार कॉल नहीं किये जाएंगे
(d) The garbage collector will use a mark and sweep algorithm गारेवज कलेक्टर एक निशान और स्वीप एलोरिदम का उपयोग करेगा
Ans: (b)

71. Which operators will always evaluate all the operands ?
कौन-सा ऑपरेटर हमेशा सभी ऑपरेटरों का मूल्यांकन करता है Select all the valid answer
(a) && (b) +
(c) | | (d) ?:
Ans: (b)

72. Which of the following are unary operators in C ?
निम्न में से कौन-सा C में यूनरी ऑपरेटर है?
1.  2. size of
3. ~ 4. &&
(a) 1, 2 (b) 1, 3
(c) 2, 4 (d) 1, 2, 3
Ans: (d)

73. Find out the error in the following program:
निम्नलिखित प्रोग्राम में त्रुटि का पता लगाए:
main() { int mark; char grade; switch (mark) { case 5: grade = 'A'; break; case 4; grade = 'B'; break; case 4; grade = 'B'; break; default; grade = 'C'; break; } /*switch*/ }
(a) case labels cannot be numbers केस लेबल्स नम्बर नहीं हो सकता है
(b) switch statement cannot have more than three labels / स्विच स्टेटमेंट में तीन से अधिक लेबल नहीं हो सकता है
(c) No two labels may be identical कोई भी दो लेबल समान नहीं हो सकता है
(d) None of these / इनमें से कोई नहीं
Ans: (c)

74. In which order do the following gets evaluated:
निम्नलिखित क्रम में मूल्यांकन किया जाता है:
1. Relational / संबंधपरक
2. Arithmetic / अंकगणित
3. Logical / तार्किक
4. Assignment / असाइनमेंट
(a) 2134 (b) 1234
(c) 4321 (d) 3214
Ans: (a)

75. Specify the 2 library functions to dynamically allocate memory ?
गतिशील रूप से स्मृति आवंटित करने के लिए 2 लाइब्रेरी फंक्शन निर्दिषट करें?
(a) malloc() and memalloc()
(b) alloc() and memalloc()
(c) malploc() and calloc()
(d) memalloc() and faralloc()
Ans: (d)

76. #define dp (e) printf (#e "=%\n", e) main ( ) { int x = 3, y = 2; dp (x/y) } What will be the output of the program?/प्रोग्राम का आउटपुट क्या होगा?
(a) prints x /y = 1
(b) prints #e = 1.5
(c) prints #x/y = 1
(d) none of the above /उपर्युक्त में से कोई नहीं
Ans. (a)

77. When accessing a structure member, /the identifier to the left of the dot operator the name of: /संरचना सदस्य तक पहुंचने पर डॉट आपरेटर के बाईं ओर के पहचानकर्ता का नाम−
(a) a structure member /एक संरचना सदस्य
(b) a structure tag /एक संरचना टैग
(c) a structure variable/एक संरचना चर
(d) the keyword struct/कीवर्ड स्ट्रक्ट
Ans: (c)

78. To read and write an existing file without overwriting, the following mode is used.
किसी मौजूदा फाइल को बिना ओवर राइटिंग के पढ़ने और लिखने के लिए निम्न मोड का उपयोग किया जाता है−
(a) r (b) w
(c) r+ (d) w+
Ans: (c)

79. Data type of the controlling statement of a SWITCH statement cannot of the type:/किसी SWITCH कथन के नियंत्रण का डेटा प्रकार इस प्रकार नहीं हो सकता −
(a) int (b) char
(c) short (d) float
Ans: (a)

80. What is the effect of the following code?
निम्नलिखित कोड का क्या प्रभाव है?
main ( ) { int option = 4; switch (option/2) { case 1: printf ("EAST"); case 2: printf ("WEST"); case 3: printf ("NORTH"); case 4: printf ("SOUTH"); } }
(a) WEST/पश्चिम
(b) Syntax error because break is missing सिंटेक्स त्रुटि क्यों break अनुपस्थित है।
(c) WEST NORTH SOUTH/पश्चिम‚ उत्तर‚ दक्षिण
(d) Syntax error because default case is missing सिंटेक्स त्रुटि क्योंकि default case अनुपस्थित है।
Ans: (c)

81. What will be the output of the following program?
निम्नलिखित प्रोग्राम का आउटपुट क्या होगा?
main ( ) { int a; printf ("%d", a); }
(a) 0
(b) 1
(c) Error
(d) Unpredictable Value
Ans: (d)

82. By default a real number is treated as a:
डिफाल्ट रूप से एक वास्तविक संख्या के रूप में माना जाता है−
(a) float/फ्लोट
(b) double/डबल
(c) long double/लॉन्ग डबल
(d) integer/इन्टीजर
Ans: (b)

83. ATM header is:
ATM हेडर है−
(a) 48 byte (b) 15 byte
(c) 5 byte (d) 24 byte
Ans: (c)

84. Function putchar ( ) displays.
फंक्शन फलक () प्रदर्शित करता है−
(a) one word at a time on the screen स्क्रीन पर एक बार में एक शब्द
(b) one character at a time/एक समय में एक अक्षर
(c) result on the screen /स्क्रीन पर परिणाम
(d) None of the above/उपर्युक्त में से कोइ्र नहीं
Ans: (b)

85. How many times "INDIA" will get printed?
"INDIA" को कितनी बार प्रिंट किया जाएगा?
#include<stdio.h> int main ( ) { int x; for (x = –1; x <= 10; x++) { if(x < 5) continue; else break; printf ("INDIA") } Return 0:
}
(a) Infinite times/अनन्त बार
(b) 11 times/11 बार
(c) 0 times/0 बार
(d) 10 times/10 बार
Ans: (c)

86. The keyword struct and class differ in C++ context-
C++ में कीवर्ड और वर्ग भिन्न होता है−
(a) struct is used in C where as class in used in C++ स्ट्रक्ट C का उपयोग करता है जबकि वर्ग c++ का उपयोग करता है
(b) Struct can not have member functions where as a class can have/स्ट्रक्ट में सदस्य फंक्शन नहीं होते जबकि वर्ग में होते है
(c) Struct has default public, class has default private/स्ट्रक्ट डिफाल्ट सार्वजनिक है जबकि वर्ग डिफॉल्ट निजी है
(d) All of the above/उपरोक्त सभी
Ans: (c)

87. Overloaded function in C++ C++ में अधिभारित फंक्शन है−
(a) are a group of function with the same name समान नामों का एक फंक्शन समूह है
(b) all have the same name and type of arguments सभी का समान नाम और तर्क का प्रकार
(c) may fall unexpectedly due to streess तनाव का कारण आपेक्षित रूप से गिर सकता है
(d) all of the above/उपर्युक्त सभी
Ans: (a)

88. An error in the program logic can be detected:
प्रोग्राम लॉजिक में गलती को पता लगाया जा सकता है−
(a) by the operating system/आपरेटिंग सिस्टम के द्वारा
(b) by the compiler/कम्पाइलर के द्वारा
(c) during execution of the program प्रोग्राम के क्रियान्वयन के दौरान
(d) None of the above/उपरोक्त में से कोई नहीं
Ans: (c)

89. The memory address of fifth element of an array can be calculated by the formula:
एक ऐरे के 5वें तत्व के मेमोरी ऐड्रेस को किस सुत्र के द्वारा कैल्कुलेट किया जा सकता है−
(a) LOC (Array[5] = Base (Array) + w (5–lower bound), where w is the number of words per memory cell for the array/जहाँ w किसी ऐरे के शब्द/मेमोरी सेल की संख्या है
(b) LOC(Array[5]) = Base (Array[5]+ (5–lower bound), where w is the number of words per memory cell for the array/जहाँ w किसी ऐरे की शब्द/मेमोरी सेल की संख्या है
(c) LOC(Array[5]) = Base (array[4]) + (5–Upper bound), where w is the number of words per memory cell for the array/जहाँ w किसी ऐरे की शब्द p मेमोरी सेल की संख्या हे
(d) None of above/उपरोक्त में से कोई नहीं
Ans: (a)

90. Which one of the following is not a basic data type in C ?
निम्न में से कौन C में एक बेसिक डेटा टाइप नहीं है−
(a) Integer/पूर्णांक
(b) Complex/काम्प्लेक्स
(c) Character/करेक्टर
(d) None of these/उपरोक्त में से कोई नहीं
Ans: (d)

91. break statement can be simulated by using:
ब्रेक स्टेटमेंट का उपयोग करके अनुकरण किया जा सकता है−
(a) goto
(b) return
(c) exit
(d) any to the above features उपर्युक्त सुविधाओं में से कोई नहीं
Ans: (a)

92. Using goto inside for loop is equivalent to using:
लूप के अंदर जाने के लिए उपयोग बराबर है
(a) continue
(b) break
(c) return
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (d)

93. Which type of errors is flagged by compliers ?
कंपाइलर द्वारा किस प्रकार की त्रुटियों (Error) को फ्लैग किया जाता है?
(a) Run–time errors/रन-टाइम-एरर
(b) Logical errors/लॉजिकल एरर
(c) Syntax errors/सिंटैक्स एरर
(d) None of the above/उपर्युक्त में से कोई नहीं
Ans: (c)

94. An algorithm is best described as:
एक एल्गोरिद्‌म सबसे अच्छा वर्णित किया गया है−
(a) a branch of mathematics गणित की एक शाखा के रूप में
(b) a step–by–step procedure for solving a problem/समस्या को हल करने हेतु एक चरण-दरचरण प्रक्रिया के रूप में
(c) a computer language एक कम्प्यूटर भाषा के रूप में
(d) None of these/इनमें से कोई नहीं
Ans: (b)

95. Bug means:
बग का अर्थ है−
(a) A logical error in a program एक प्रोग्राम में एक लॉजिकल एरर
(b) A difficult syntax error in a program एक प्रोग्राम में एक सिंटेक्स एरर
(c) Documenting programs using an efficient documentation tool/एक कुशल डॉक्युमेंटेशन टूल का प्रयोग करके प्रोग्रामिंग
(d) None of these/इनमें से कोई नहीं
Ans: (a)

96. The following program fragment निम्नलिखित प्रोग्राम खण्ड (कोड) int a = 4, b = 6; printf ("%d", a = = b);
(a) outputs an error message आउटपुट एक एरर मैसेज देता है
(b) prints 0/0 प्रिंट करता है
(c) print 1/1 प्रिंट करता है
(d) None of the above/उपर्युक्त में से कोई नहीं
Ans: (b)

97. Any transcription error can be repaired by:
किसी भी प्रतिलेखन त्रुटि की मरम्मत की जा सकती है−
(a) insertion alone/अकेले इनसर्सन (सम्मिलन)
(b) deletion alone/अकेले हटाना
(c) insertion and deletion alone अकेले सम्मिलन और हटाना
(d) replacement alone/अकेले प्रतिस्थापन
Ans: (c)

98. For (i = 1; i < 5; ++i) if (i = = 3) continue; else printf ("%d", i); results in the printing of:
प्रिंट करने पर परिणाम आता है−
(a) 1 2 4 5
(b) 1 2 4
(c) 2 4 5
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (b)

99. The following loop निम्नलिखित लूप for (i = 1, j = 10; i < 6; ++ i, – –j) print("%d %d", i , j); sprints प्रिंट करता है−
(a) 1 10 2 9 3 8 4 7 5 6
(b) 1 2 3 4 5 10 9 8 7 6
(c) 1 1 1 1 1 9 9 9 9 9
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (a)

100. Size of return operator bytes are depend upon:
रिटर्न ऑपरेटर की साइज बाइट में निर्भर होती है−
(a) identifier/पहचानकर्ता
(b) type/प्रकार
(c) identifier or type/पहचानकर्ता और प्रकार
(d) array/सारणी
Ans: (b)

101. Consider the following program:
निम्न प्रोग्राम पर विचार कीजिए। main ( ) { char *k =xyz; f(k); printf ("%s\n", k); } f (char *k) { k = malloc (4); strcpy (k, "pq"); } What will be the output?
आउटपुट क्या होगा ?
(a) pq
(b) xyz
(c) syntax error/सिंट्रक्स त्रुटि
(d) none of the above/उपयुक्त में से कोई नहीं
Ans: (b)

102. Given the piece of code दिया गया कोड खण्ड − int a [50]; int *pa; pa=a; To access the 6th element of the array which of the following is incorrect?/ऐरे के छठवें एलीमेन्टस के एक्सेस के सन्दर्भ में कौन सा परिणाम असत्य है?
(a) *(a + 5) (b) a[5]
(c) pa[5] (d) *(*pa + 5)
Ans: (d)

103. Output of the following program will be:
दिये गये प्रोग्राम का आउटपुट होगा− main ( ) { int a [ ] = {1, 2, 9, 8, 6, 3, 5, 7, 8, 9}; int *p = a + 1; int *q = a + 6; printf ("\n&d", q - p); }
(a) 9 (b) 5
(c) 2
(d) None of the above/इनमें से कोई नहीं
Ans: (b)

104. What will be the output of the following code segment?
निम्नलिखित कोड खण्ड का आउटपुट क्या होगा?
int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, *p = a; print ("n\%d", p [7], p [a[7]]) ;
(a) 7: 7 (b) 7: 8
(c) 8: 9 (d) 8: 8
Ans: (c)

105. What will be the output of the following code?
निम्नलिखित कोड का आउटपुट क्या होगा?
void fun (int a[ ], int a) { a[0]=a [2]+a[2]; a[2]=a[0]+a[0] ; a[1]=a [1]+a, a[3]=a[3]*a[3]; } main ( ) { int n[ ] ={5, 3, 2, 1}, size = 4; fun (n, size); printf ("%d %d %d %d", n, n[1], n[2], n[3]); }
(a) 5 3 2 1
(b) syntax error
(c) 5 7 8 1
(d) 4 7 8 1
Ans: (d)

106. In the following 'C' code दिये गये 'C' कोड में− { FILE *f = fopen (fileName, "r"); fread (f); if (????) puts ("End of file reached"); } Which one of the following can replace the ???? in the code above to determine if the end of a file has been reached?/निम्नलिखित में से कौन सा एक कोड ऊपर दिये गये ???? को निर्धारित करने हेतु प्रतिस्थापित कर सकता है यदि कोई फाइल अन्त तक पहुँच गई हो?
(a) f = = EOF (b) feof (f)
(c) eof(f) (d) f = = NULL
Ans: (b)

107. If a variable is a pointer to a structure, then which of the following operator is used to access data member of the structure through the pointer variable.
यदि किसी संरचना में चर एक प्वाइंटर हो‚ तो कौन से ऑपरेटर का प्रयोग प्वाइंटर चर द्वारा संरचना के डाटा मेंबर को एक्सेस करने हेतु किया जाता है?
(a) ' ' (b) '&'
(c) '*' (d) '->'
Ans: (d)

108. Which of the following is not a basic data type used in C language?
निम्न में से कौन सा 'C' लैंग्वेज में एक बेसिक डाटा प्रकार के रूप में प्रयुक्त नहीं होता ?
(a) double (b) float
(c) char (d) array
Ans: (d)

109. What does fp point to in the program?
प्रोग्राम में fp प्वाइंट क्या सूचित करता है?
#include<stdio.h> int main ( ) { FILE *fp; fp=fopen("trial", r); return 0; }
(a) The first character in the file फाइल का प्रथम कैरेक्टर
(b) A structure which contains a char pointer which points to the first character of a file एक संरचना जो कि चर प्वाइंटर धारित करती है तथा जो फाइल के प्रथम कैरेक्टर को केन्द्रित करती है
(c) The name of the file/फाइल का नाम
(d) The last character in the file फाइल का अन्तिम कैरेक्टर
Ans: (a)

110. How many times is a do while loop guaranteed to loop?
do while loop कितनी बार किसी लूप को आश्वस्त करता है
(a) 0 (b) Infinitely
(c) 1 (d) Variable
Ans: (c)

111. C function returns ………. value by default:
C फंक्शन स्वत: ......... वापस करता है।
(a) Character (b) No
(c) Integer (d) Float
Ans: (c)

112. What is this operator called>> ?
>> ऑपरेटर कहलाता है−
(a) Insertion operator
(b) Extraction operator
(c) Assignment Operator
(d) All of the above/उपर्युक्त सभी
Ans: (b)

113. The rule for implicit type concversion in 'C' is:
C में अन्तर्निहित प्रकार के रूपांतरण नियम है−
(a) int < unsigned < float < double
(b) unsigned < int < float < double
(c) int < unsigned < double < float
(d) unsigned < int < double < float
Ans: (a)

114. In C language. % Id is used as the format of ……. data type:
C भाषा में % Id को डेटा प्रकार के रूप में उपयोग किया जाता है−
(a) int
(b) long int
(c) double int
(d) long distance
Ans: (b)

115. What will be the output of the following program/निम्नलिखित प्रोग्राम का आउटपुट क्या होगा?
Main ( ) { int val = 500; int *ptr = &val; printf ("val = %d", **ptr1); }
(a) 500
(b) address of ptr
(c) contents of ptr
(d) none of the above/इनमें से कोई नहीं
Ans: (b)

116. Consider the following code segment:
In order to sum all the odd numbers between 1 to 100; which of the following statements cannot replace ***?
for (odd_sum = 0, j = 1; ***; j + = 2 odd_sum + = j ; 1 से 100 तक के बीच के सभी विषम संख्याओं के योग के सन्दर्भ में कौन-सा कथन प्रतिस्थापित नहीं किया जा सकता?
(a) < = 99 (b) < 99
(c) < = 100 (d) < 100
Ans: (b)

117. Find the error in the following program नीचे दिये गये प्रोग्राम में त्रुटि ज्ञात करें− main ( ) { int m; char g; switch (m) { case 5: grade="P" break; case 2: grade="Q" break; case 2: grade="R" break; default: grade = "S" break; } }
(a) No two labels may be identical दो लेवल समान नही हो सकते
(b) switch statement cannot have more than three labels/स्विच कथन तीन लेवल से अधिक नही हो सकता
(c) case label cannot be numbers केस लेवल संख्या नहीं हो सकते
(d) none of the above/इनमें से कोई नही
Ans: (d)

118. Size of the following union (assume size of int =2; size of float=4 and size of char = 1); union Jabb { int a; flat b; char c; };
(a) 2 (b) 4
(c) 1 (d) 7
Ans: (b)

119. What is the output of the following code?/निम्नलिखित कोड का आउटपुट क्या होगा?
main ( ) int a=1, b=10; swap (a, b); printf ("\n %d", a, b) ; } swap (int x, int y) { int temp; temp = x; x = y; y = temp; }
(a) 1 1
(b) 1 10
(c) 10 1
(d) None of the above/इनमें से कोई नही
Ans: (b)

120. Which of the following statement is correct about the following program?
निम्नलिखित प्रोग्राम के सन्दर्भ में कौन-सा कथन सही है− #include<stdio.h> long fun (int num) { int i; long f = 1; for (i = 1; i < = num; i++) f = f * 1; return f; }
(a) The function calculates the value of 1 raised to power num.
फंक्शन पावर नम की एक बड़ी संख्या
(b) The function calculates the sqare roof of an integer./फंक्शन किसी पूर्णांक के वर्गमूल की गणना
(c) The function calculates the factorial value of an integer./फंक्शन किसी पूर्णांक के फैक्टोरियल वैल्यू की गणना करेगा
(d) None of the above/इनमें से कोई नहीं
Ans: (c)

121. pow(x, y) is used to pow(x, y) का उपयोग किया जाता है
(a) power of yx
(b) power of xy
(c) logarithm of x on the base y
(d) Such function does not exist
Ans: (b)

122. The do ....... while looping statement.
(a) is executed only once if the condition is true
(b) is also known as entry-controlled loop
(c) is executed at least once if the condition is false
(d) is unconditional looping statement
Ans: (c)

123. Which one of the following is VALID in C language?
निम्न में से कौन−सा एक प्रोग्राम C लैग्वेंज में वैध प्रोग्राम है?
(a) printf("%d", ++4)
(b) float n, a [n];
(c) int *p=&a, a=3,
(d) for (; ;);
Ans: (d)

124. Which of the following is not a header file of C?
निम्न में से कौन C में एक हेडर फाइल नहीं है?
(a) Ctype.h (b) String.h
(c) Stdlib.h (d) type.h
Ans: (d)

125. In C language, conditional operator is also called as:
C भाषा में संवर्ति ऑपरेटर को भी कहा जाता है−
(a) logical operator/तार्किक ऑपरेटर
(b) unary operator/युनरी ऑपरेटर
(c) ternary operator/टर्नरी ऑपरेटर
(d) binary operator/बाइनरी ऑपरेटर
Ans: (c)

126. By default the return type of any user defined function in 'C' is:
डिफॉल्ट रूप से C भाषा में किसी उपयोगकर्ता परिभाषित फंक्शन का रिटर्न प्रकार है−
(a) void/वैध
(b) float/फ्लोट
(c) integer/इंटिजर
(d) none of these/इनमें से कोई नहीं
Ans: (c)

127. Which of the following directive creates functions like macros?
निम्न में से कौन सा निर्देश मैक्रोज जैसे फंक्शन बनाता है?
(a) #include (b) #define
(c) #undef (d) #ifdef
Ans: (b)

128. In C, if you pass an array as an argument to a function, what actually gets passed?
C में यदि आप कार्य करने के लिए तर्क के रूप में किसी सारणी को पास करते है तो वास्तव में क्या कार्य हो जाता है?
(a) Value of elements in array सारणी में तत्व का मान
(b) First element of the array/सारणी में पहला तत्व
(c) Base address of the array/सारणी में आधार पता
(d) Address of the last element of array सारणी में अन्तिम तत्व का पता
Ans: (c)

129. What is the value of r after this code is executed?
इस कोड को क्रियान्वित करने के बाद r का क्या मान होता है?
r=2; k=8; if (r >3 ||k > 6 && r < 5 ||k > 10) r= 9 ; else r=6 ;
(a) 9 (b) 2
(c) 6 (d) 8
Ans: (a)

130. The sqrt ( ) function is available in:
sqrt ( ) के फंक्शन में उपलब्ध है−
(a) conio.h (b) string.h
(c) math.h (d) graphic.h
Ans: (c)

131. The result of a Relational operation is always.
एक संबंध परख संचालन का परिणाम हमेशा होता है−
(a) either True or False/या तो सत्य या तो असत्य
(b) is less than or is more than/या तो कम या तो अधिक
(c) is equal or less or more/बराबर या कम या अधिक
(d) All of the above/उपर्युक्त सभी
Ans: (a)

132. Which of the following cannot be used as identifiers?
निम्न में से किसका प्रयोग पहचानकर्ता के रूप में नहीं किया जा सकता ?
(a) Spaces/स्पेस
(b) Digits/अंक
(c) Underscores/अंडरस्कोर
(d) Letters/अक्षर
Ans: (b)

133. What will be the output of the following code?
निम्नलिखित कोड में आउटपुट होगा− main ( ) { int a, b; a=3%4; switch (a/1) { default: printerf ("I"); case 3: printf ("T"); case 2: printf ("W"); case 1: prinf ("O"); } }
(a) ITWO
(b) TWO
(c) Syntax error because break is missing सिंटेक्स त्रुटि क्यों ब्रेक नहीं है
(d) Syntax error because default is misplaced सिंटैक्स त्रुटि क्योंकि डिफाल्ट स्थान पर है
Ans: (b)

134. How many times the printf statement within the while loop will be executed?
कब लुप के भीतर printf स्टेटमेंट को कई बार निस्पादित किया जायेगा?
x=1; while (x=0) printf ("hello");
(a) 1 (b) 0
(c) infinite (d) 2
Ans: (d)

135. Which of the following operation cannot be perform on pointers in C?
निम्न में से किस ऑपरेशन को C के प्वाइंट में निस्पादित नहीं किया जा सकता है−
(a) Addition of two pointers/दो प्वाइंटर को जोड़ना
(b) Subtraction of a number from a pointer एक प्वाइंटर से संख्या को घटाना
(c) Subraction of one pointer from another एक प्वाइंटर को एक दूसरे से घटना
(d) Addition of a number to a pointer एक प्वाइंटर के दो अंक को जोड़ना
Ans: (a)

136. In C programming language, which of the following operators has the highest precedence?
C प्रोग्रामिंग भाषा में निम्न में से ऑपरेटर की उच्च प्रधानता है−
(a) Unary + (b) ≤(c) ≥(d) >
Ans: (a)

137. The symbol<< << प्रतीक है−
(a) is called insertion operation प्रविष्ट ऑपरेशन कहलाता है
(b) is called output operator आउटपुट ऑपरेटर कहलाता है
(c) is called extraction operator निष्कर्षण ऑपरेटर कहलाता है
(d) both a and b/a और b दोनों
Ans: (d)

138. Which of the following is a Lex operator निम्न में से कौन लेक्स ऑपरेटर है−
(a) * (asterisk) (b) | (OR)
(c) + (d) All of these/उपरोक्त सभी
Ans: (d)

139. Finalizer() ?
फाइनेलाइजर () है−
(a) finalizer ( ) are called just before the object is garbage collected, and its memory is reclaimed/फाइनेलाइजर ( ) को आब्जेक्ट के तुरंत पहले का एकत्रित कचरा कहा जाता है जिसे पुन: प्राप्त किया जा सकता है
(b) finalizer method is represented as finalize
()/फाइनेलाइजर विधि को फाइनेलाइज () द्वारा प्रस्तुत किया जाता है
(c) Finalize () can be overridden/फाइनेलाइज () अधिरोहित किया जा सकता है−
(d) all of the above/उपरोक्त सभी
Ans: (d)

140. Which of the following are valid character constants ?
निम्नलिखित में कौन मान्य वर्ज स्थिरांक है?
(a) '1n'
(b) '11'
(c) '10'
(d) all of the above/उपर्युक्त सभी
Ans: (d)

141. What will be the output of the following code segment, if the function is called as larger (10, 20)?
निम्नलिखित कोड खंड का आउटपुट क्या होगा? यदि फंक्शन को इस रूप में (10‚ 20) में लिखा जाता है− int larger (int x, int y) { int max = x; if (max < y) { max = y; } else return A; print ("Larger of %d and %d is %d", x, y, max); }
(a) Program will not compile as the function has two return statements./प्रोग्राम के रूप में क्रियान्वयन नहीं किया जाएगा‚ क्योंकि दो वक्तव्य वापस लिए गए है
(b) Program will not compile as no statement is allowed after return statement./प्रोग्राम का क्रियान्वयन नहीं होगा क्योंकि कोई कथन वापस लिए गए कथन के बाद अनुसरण नहीं करता है।
(c) Larger of 10 and 20 is 20./र
(d) No output/आउटपुट नहीं
Ans: (b)

142. What is the missing statement in the following function which copies string x into string y निम्नलिखित फंक्शन में लुप्त कथन क्या है‚ जो x श्रंृखला y श्रंृखला में कॉपी करता है− void strcpy (char * x, char * y) { while (*y  = '\0') .........................\* missing statement */ *x = '\0'; }
(a) x = y
(b) *x++ = *y ++
(c) (*x)++ = (*y)++
(d) none of the above/उपर्युक्त में कोई नहीं
Ans: (b)

143. The size of a character variable in 'C' is:
'C' में अस्थायी स्थिर अक्षर का आकार क्या है−
(a) 4 byte/4 बाइट
(b) 8 bytes/8 बाइट
(c) 16 bytes/16 बाइट
(d) None of the above/उपर्युक्त में से कोई नहीं
Ans: (d)

144. What is wrong with the following code?
निम्नलिखित कोड में क्या अनुपयुक्त है− struct Person { char * name; struct Person Mother, Father; } Anita;
(a) The ; should appear after the } and Anita be defined later.
(b) name should be defined as an array
(c) struct Person Mother, Father: must be defined as struct Person *Mother, *Father;
(d) There is no error in the code
Ans: (c)

145. Calculate the number of iterations in the following loop.
निम्नलिखित लूप में विवरणों की संख्या का पता लगाएँ− main ( ) { int x = 5, y = 10, z = 9; for ( ; x <= 5;) { y ++; z == ; x =x + 1 /2; if (z= = 0) z = y ; } }
(a) Only one iteration/केवल एक विवरण
(b) Infinite/अनन्त
(c) 32762/र
(d) None of the above/उपर्युक्त में से कोई नहीं
Ans: (b)

146. What will be the output of the following 'C' program.
निम्नलिखित 'C' प्रोग्राम का आउटपुट क्या होगा− main ( ) { int a=5; float b = 5.0; if (a = = b) printf ("a and b are equal"); else printf("a and b are different"); }
(a) a and b are equal/a और b समान हैं
(b) a and b are different/a और b भिन्न हैं
(c) Error/त्रुटि
(d) None of the above/उपर्युक्त में से कोई नहीं
Ans: (a)

147. For the program given below, which of the following statement is correct?
नीचे दिए गए प्रोग्राम के लिए‚ कौन-सा कथन सत्य है− void main ( ) { int i; for (;scanf("%d", %i);print("%d",i)) ; }
(a) The for loop would not get executed at all.
लूप सभी पर लागू नहीं किया जाएगा
(b) The for loop would get executed only once.
लूप केवल एक बार लागू किया जाएगा
(c) The for loop would get executed 5 times.
लूप 5 बार लागू किया जाएगा
(d) The for loop would get executed infinite times./लूप अनन्त बार लागू किया जाएगा
Ans: (d)

148. Which of the following is not a proper storage class in 'C'?
निम्नलितखत में से 'C' में उचित भंडारण श्रेणी नहीं है−
(a) auto (b) dec
(c) static (d) extern
Ans: (b)

149. Which of the following is a valid string constant?
निम्न में से कौन सा एक वैध स्ट्रिंग कॉन्सटेन्ट है−
(a) "programming"
(b) "programming
(c) 'programming
(d) $programming $
Ans: (a)

150. What is the output of the following code?
निम्नलिखित कोड का आउटपुट क्या है− main () { static int num=8; printf ("%d", num=num-2); if(numl=0) main ();}
(a) 8 6 4 2
(b) Infinite output/अनन्त आउटपुट
(c) 6 4 2 0
(d) Invalid because main function can't cail itself./अमान्य‚ क्योंकि मुख्य कार्य (function) स्वत:
नहीं रूक सकता है
Ans: (c)

151. How many times "India BIX" is get printed?
"India BIX" को कितनी बार प्रिंट किया जाता है− int main () { int x; for (x = –1); x < = 10; x++) { if (x < 5) continue; else break; printf ("IndiaBIX"); } return 0; }
(a) Infinite times/अनन्त बार
(b) 11 times/11 बार
(c) 0 times/0 बार
(d) 10 times/10 बार
Ans: (c)

152. The value of the following 'C' expression is– 2 + 18/4 – 1 निम्नलिखित अभिव्यक्ति का मूल्य है− 2 + 18/4 – 1
(a) 5.5 (b) 5
(c) 6 (d) 4
Ans: (b)

153. Printing a character as an integer:
एक कैरेक्टर को पूर्णांक (integer) के रूप में प्रिंट करना−
(a) results in the printing of a negative integer एक नकारात्मक पूर्णांक की प्रिंट का परिणाम होता है।
(b) always prints a positive integer हमेशा एक धनात्मक पूर्णांक की छपाई (प्रिंट) करता है।
(c) prints a value that is implementation dependent/एक मूल्य (value) मुद्रित करता है‚ जो कार्यान्वयन पर निर्भर करता है।
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (c)

154. Pick the operators that associate from the left:
बाईं ओर से जुड़े ऑपरेटरों को चुनें−
(a) +
(b) ,
(c) %
(d) all of the above/उपर्युक्त सभी
Ans: (d)

155. Pick the operators that associate from the right:
दाईं ओर से जुड़े ऑपरेटरों को चुनें−
(a) ++
(b) + =
(c) =
(d) all of the above/उपर्युक्त सभी
Ans: (d)

156. printf ("^c", 100);
(a) prints 100/100 प्रिंट करता है
(b) prints the ASCII equivalent of 100/100 के बराबर ASCII प्रिंट करता है
(c) prints garbage/गार्बेज प्रिंट करता है
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (b)

157. The following statement निम्नलिखित कथन printf ("%f", 9/5); prints प्रिंट करता है−
(a) 1.8
(b) 1.0
(c) 2.0
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (d)

158. The statement निम्नलिखित कथन printf("%f", (float) 9/5); prints प्रिंट करता है
(a) 1.8
(b) 1.0
(c) 2.0
(d) none of the above/उपर्युक्त में से कोई नहीं
Ans: (a)

159. Which of the following are not keywords in C?
निम्नलिखित में से कौन-सा 'C' में की-वर्ड नहीं है?
(a) printf
(b) main
(c) IF
(d) all of the above/उपर्युक्त सभी
Ans: (d)

160. Pick the operators whose meaning is context dependent:
उन ऑपरेटरों को चुनें जिनके अर्थ सन्दर्भ (context) पर आधारित हैं−
(a) *
(b) #
(c) &
(d) all of the above/उपर्युक्त सभी
Ans: (d)

161. What would be value of j after the following is executed?/निम्न के निष्पादित होने के बाद j का मान क्या होगा?
k = 17; j = 6; if (k < 10) j = 8; j = j + 1; j = j + 2;
(a) 8
(b) 9
(c) 7
(d) 10
1. (b): k= 17, j = 6 यदि (k < 10) j = 8; j = j + 1 j = 8+1 j = 9

162. Given the following code fragment:
निम्नलिखित दिया गया कोड खण्ड void main (void) { char x = '\0' ; char n = 'N' ; printf ("%u" "%s\n", &n, &n); } What will be the result of execution?
निष्पादन का परिणाम क्या होगा?
(a) ddddd N (where d represents any digit) जहाँ d किसी अंक का प्रतिनिधित्व करता है।
(b) 78N
(c) 78 garbage
(d) compilation error/संकलन त्रुटि
Ans: (a)

163. The value of variable x after executing the following code will be:
निम्नलिखित कोड को निष्पादित करने के बाद चर x का मान होगा− val = –200; x = (val >= 0) ; val: –val;
(a) 0 (b) 200
(c) –200 (d) 1
Ans: (b)

164. What will be the output of the following?
निम्नलिखित का आउटपुट क्या होगा?
main ( ) { int a = 'A'; printf ("%d", a);
(a) 65
(b) A
(c) a
(d) the program will not compile as an integer variable is assigned a character constant.
Ans: (a)

165. The CONTINUE statement cannot be used with:
CONTINUE statement का प्रयोग नहीं किया जा सकता है−
(a) for (b) switch
(c) do (d) while
Ans: (b)

166. What is wrong with the following function?
निम्नलिखित फंक्शन में क्या गलत है?
int main (int ac, char *av [] ) { if (ac = = 0) return 0; else { printf ("%s", av[ac-1]); main (ac - 1, av) ; } return 0; }
(a) Function cannot have name as Main, it should be main only.
(b) The arguments' name must be argc and argv, respectively
(c) There cannot be two return statements in the function.
(d) There is no error in the function.
Ans: (d)

167. What will be the output of the following code?
निम्नलिखित कोड का आउटपुट क्या होगा?
struct abc{ int a; int b; } v[3], *p; main ( ) { p=v; p–>a=3; p–>b=p–>a; printf ("%d %d, v [0]. a, v[0]. b"); }
(a) 3 4 (b) 4 3
(c) Any garbage values (d) 3 3
Ans: (d)

168. Which of the following functions is used to free the allocated memory?
आवंटित मेमोरी को खाली करने के लिए निम्नलिखित फंक्शन में से कौन सा प्रयोग किया जाता है?
(a) remove (var-name);
(b) free (var-name);
(c) delete (var-name);
(d) dalloc (vr-name);
Ans: (b)

169. Which is an incorrect variable name?
कौन सा गलत वैरिएबल नाम है?
(a) Id_No (b) ID_NO
(c) IdNo (d) Id No
Ans: (d)

170. Which of the following language is predecessor to 'C' Programming Language?
निम्न में से कौन−सी C प्रोग्रामिंग लैंग्वेज के पूर्ववर्ती है?
(a) A (b) B
(c) ADA (d) C++
Ans: (b)

171. Which of the following can not be used as Identifiers?
निम्नलिखित में से कौन सा आइडेन्टिफायर्स के रूप में प्रयोग नहीं किया जा सकता है?
(a) Letters
(b) Digits
(c) Underscores
(d) none of these/इनमें कोई नहीं
Ans: (b)

172. Suppose that x is initialized as:
Short int x ; /* assume x is 16 bits in size */ What is the maximum number that can be printed using printf ("%d\n", x) printf ("%d\n", x) का प्रयोग करके कितनी अधिकतम संख्या प्रिंट की जा सकती है−
(a) 127 (b) 128
(c) 255 (d) 32,767
Ans: (d)

173. Which format specification is used in printf statement to print hexadecimal for इनमें से किस कथन का प्रयोग हेक्साडेसिमल फॉर्मेट में प्रिंट करने के लिए किया जाता है−
(a) %i (b) %c
(c) %x (d) %u
Ans: (c)

174. For the code segment struct DOB {int date, month, year;} struct person {char name[30]; struct DOB birthdate;} p, *ptr = & p; Which of the following is not a valid expression to access year of birth date?
निम्नलिखित में से कौन सा जन्म तिथि के वर्ष तक पहुंचने के लिए वैध अभिव्यक्ति नहीं है?
(a) ptr -> birthdate.year
(b) (*ptr).birthdate.year
(c) ptr.birthdate.year
(d) p.birthdate.year
Ans: (a)

175. How many times "DOEACC" will get printed?
कितनी बार "DOEACC" प्रिंट हो जायेगा− #include<stdio.h> int main ( ) { int x; for (x= –1; x<=10; x++) { if (x < 5) continue; else break; printf("DOEACC"); } return 0; }
(a) infinite times/अनन्त बार
(b) 11 times/11 बार
(c) 0 times/0 बार
(d) 10 times/10 बार
Ans: (c)

176. What will be the output of the following program?
निम्नलिखित प्रोग्रामों का आउटपुट क्या होगा?
void main ( ) { struct emp { char name [20]; int age; float sal; } struct emp e = {"Tiger"} ; printf ("\n%d % f", e.age, e.sal);
(a) 00.000000
(b) Garbage values/गारवेज वैल्यू
(c) Error/त्रुटि
(d) None of the above/इनमें से कोई नहीं
Ans: (a)

177. Which of the following is not a valid relational operator?
निम्नलिखित में से कौन वैध रिलेशनल ऑपरेटर नहीं है?
(a) < (b) –
(c) >= (d) <=
Ans: (b)

178. What will be the ouput of the following code segment?
निम्नलिखित प्रोग्राम का आउटपुट क्या होगा?
void fn () { static int i = 10; printf ("%d", ++i); } main () { fn () ; fn(); }
(a) 10 10 (b) 11 11
(c) 11 12 (d) 12 12
Ans: (c)

179. Consider the following loop:
निम्नलिखित लूप पर विचार करें− for (j = 0; j < 10; j++) { printf ("#d\n", j); if (j = = 5) continue; } Which of the following while loop is equivalent to the above given for loop?
निम्नलिखित में से कौन-सा लूप दिए गए उपर्युक्त लूप के बराबर है−
(a) k = 0; while (k < 10) { ptintf. ("%d\n", k); if (k = = 5) continue; k++; }
(b) a = 0; while (a < 10) { if (a - = = 5) continue; printf ("%d\n", a); a++; }
(c) m = 0, while (m < 10) { printf ("%d\n", m); if (m++ = = 5) continue; }
(d) while (x < 10) { x = 0; printf ("%d=\n", x); if (x = = 5) continue; + +x; }
Ans: (b)

180. Which header file should be included to use functions like malloc ( ) and calloc ( )?
कौन सी हेडर फाइल का उपयोग malloc ( ) और calloc ( ) जैसे फंक्शन के लिए किया जाता है−
(a) memory.h (b) stdlib.h
(c) string.h (d) dos.h
Ans: (b)

181. What will be the output of the following 'C' program निम्नलिखित 'C' प्रोग्राम का आउटपुट क्या होगा− main ( ) { int asl; int b=5; if(a=5 ||b > 10) printf ("I will certainly pass"); printf else printf ("I am not so sure about the result"); }
(a) I will certainly pass/मैं निश्चित रूप से पास हो जाऊंगा
(b) I am not so sure about the result/मैं परिणाम के विषय में बहुत निश्चिन्त नहीं हूँ
(c) Error/त्रुटि
(d) None of the above/उपर्युक्त में से कोई नहीं
Ans: (a)

182. Which code will print k 20 times?
कौन सा कोड k को 20 बार प्रिंट करेगा−
(a) for (i = 1 < 20; i++) printf ("k");
(b) for (i = 1; i = 20; i ++) printf ("k");
(c) for (i = 0; i < 20; i++ printf ("k");
(d) for (i = 0; i <= 20; i++ printf ("k");
Ans: (c)

183. How will you free the allocated memory?
आवंटित मेमोरी को आप कैसे विमुक्त करेंगे−
(a) Remvoe (var-name)/हटाना
(b) Free (var-name)/मुक्त करना
(c) Delete (var-name)/मिटाना
(d) delloc (var-name)
Ans: (b)

184. For the following definitions निम्नलिखित परिभाषा के लिए− char a [] = "Hello World"; int i; Which of the following loop will print the output as Hello World निम्नलिखित में से कौन सा लूप आउटपुट को Hello World के रूप में प्रिंट करेगा−
(a) for (i = 0; a[i]  = "/0"; i++) printf ("%s", a [i]);/
(b) for (i = 0; a[i]  = '/0'; i++) printf ("%c", a [i]);/
(c) for (i = 0; a[i]  = '/0'; i++) printf ("%s", a [i]);/
(d) for (i = 0; a[i]  = '/0'; i++) printf ("%c", a [i]);/
Ans: (d)

185. Which option is the most appropriate for the following code?
निम्नलिखित कोड के लिए कौन सा विकल्प सर्वाधिक उपयुक्त है− main ( ) { char c[10]="INDIAN"; int x; for (x=4; x<7; x++) printf ("%*s", x, c); }
(a) INDIANINDIANINDIAN
(b) Complier generates error because of not sufficient space./पर्याप्त स्थान न मिलने के कारण कम्पाइलर त्रुटि उत्पन्न करता है
(c) INDIINDIAINDIAN
(d) Error because of invalid printf syntax./Invalid point syntax के कारण त्रुटि
Ans: (a)

186. In 'C', the associative of Arithmetic Operators is– 'C' में अंकगणितीय ऑपरेशन के साहचर्य है−
(a) Left to Right/बायें से दायें
(b) Top to Bottom/ऊपर से नीचे
(c) Right to Left/दायें से बायें
(d) Bottom to Top/नीचे से ऊपर
Ans: (a)

187. The logical NOT operation in performed by which of the following operators in C?
C में तार्किक NOT संक्रिया निम्नलिखित संकारक द्वारा की जाती है
(a) < > (b) #
(c) = = (d)  = 
Ans: (d)

188. Which of the following operators is used as an address operator in C?
C में पता संकारक के रूप में निम्नलिखित संकारक का प्रयोग किया जाता है
(a) " (b) &
(c) % (d) /
Ans: (b)





No comments:

Post a Comment