

MCQOPTIONS
This section includes 564 Mcqs, each offering curated multiple-choice questions to sharpen your Engineering knowledge and support exam preparation. Choose a topic below to get started.
51. |
What is stderr ? |
A. | standard error |
B. | standard error types |
C. | standard error streams |
D. | standard error definitions |
Answer» D. standard error definitions | |
52. |
What do the 'c' and 'v' in argv stands for? |
A. | 'c' means argument control 'v' means argument vector |
B. | 'c' means argument count 'v' means argument vertex |
C. | 'c' means argument count 'v' means argument vector |
D. | 'c' means argument configuration 'v' means argument visibility |
Answer» D. 'c' means argument configuration 'v' means argument visibility | |
53. |
How many times "IndiaBIX" is get printed?
|
A. | Infinite times |
B. | 11 times |
C. | 0 times |
D. | 10 times |
Answer» D. 10 times | |
54. |
Which statement will you add in the following program to work it correctly?
|
A. | #include<conio.h> |
B. | #include<math.h> |
C. | #include<stdlib.h> |
D. | #include<dos.h> |
Answer» C. #include<stdlib.h> | |
55. |
How many times the while loop will get executed if a short int is 2 byte wide?
|
A. | Infinite times |
B. | 255 times |
C. | 256 times |
D. | 254 times |
Answer» C. 256 times | |
56. |
The keyword used to transfer control from a function back to the calling function is |
A. | switch |
B. | goto |
C. | go back |
D. | return |
Answer» E. | |
57. |
What is the output of the program
|
A. | 0 |
B. | 1 |
C. | Error |
D. | None of these |
Answer» C. Error | |
58. |
Size of short integer and long integer would vary from one platform to another. |
A. | True |
B. | False |
Answer» B. False | |
59. |
What will be the output of the program?
|
A. | 20 |
B. | 40 |
C. | Error |
D. | No Output |
Answer» B. 40 | |
60. |
Range of float id -2.25e+308 to 2.25e+308 |
A. | True |
B. | False |
Answer» C. | |
61. |
What is the output of the program
|
A. | 3 |
B. | 3.14 |
C. | 0 |
D. | 4 |
E. | Compile Error |
Answer» F. | |
62. |
What is the output of the program
|
A. | Garbage Values |
B. | 2, 3, 3 |
C. | 3, 2, 2 |
D. | 0, 0, 0 |
Answer» E. | |
63. |
What is the output of the program?
|
A. | 3, 2, 515 |
B. | 515, 2, 3 |
C. | 3, 2, 5 |
D. | None of these |
Answer» B. 515, 2, 3 | |
64. |
What will be the output of the program?
|
A. | 40 40 |
B. | 20 40 |
C. | 20 |
D. | Error |
Answer» C. 20 | |
65. |
|
||||||
A. | 1 correct | ||||||
B. | 2 correct | ||||||
C. | 3 correct | ||||||
D. | 1, 2, 3 are correct | ||||||
Answer» D. 1, 2, 3 are correct | |||||||
66. |
Size of short integer and long integer can be verified using the sizeof() operator. |
A. | True |
B. | False |
Answer» B. False | |
67. |
If the definition of the external variable occurs in the source file before its use in a particular function, then there is no need for an extern declaration in the function. |
A. | True |
B. | False |
Answer» B. False | |
68. |
A long double can be used if range of a double is not enough to accommodate a real number. |
A. | True |
B. | False |
Answer» B. False | |
69. |
A float is 4 bytes wide, whereas a double is 8 bytes wide. |
A. | True |
B. | False |
Answer» B. False | |
70. |
Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS) |
A. | True |
B. | False |
Answer» C. | |
71. |
What is the output of the program given below ?
|
A. | 0, 1, 2 |
B. | 1, 2, 3 |
C. | 0, 2, 1 |
D. | 1, 3, 2 |
Answer» D. 1, 3, 2 | |
72. |
What will be the output of the program in 16 bit platform (Turbo C under DOS)?
|
A. | 2 |
B. | 4 |
C. | vary from compiler |
D. | Linker Error : Undefined symbol |
E. | <i class="C-code">'i'</i> |
Answer» E. <i class="C-code">'i'</i> | |
73. |
What is the output of the program?
|
A. | 20 |
B. | 0 |
C. | Garbage Value |
D. | Error |
Answer» B. 0 | |
74. |
What is the output of the program in Turbo C (in DOS 16-bit OS)?
|
A. | 2, 4, 6 |
B. | 4, 4, 2 |
C. | 2, 4, 4 |
D. | 2, 2, 2 |
Answer» D. 2, 2, 2 | |
75. |
What is the output of the program
|
A. | 0, 0.000000 |
B. | Garbage values |
C. | Error |
D. | None of above |
Answer» B. Garbage values | |
76. |
Is there any difference in the following declarations? |
A. | Yes |
B. | No |
Answer» B. No | |
77. |
Suppose a program is divided into three files f1, f2 and f3, and a variable is defined in the file f1 but used in files f2 and f3. In such a case would we need the extern declaration for the variables in the files f2 and f3? |
A. | Yes |
B. | No |
Answer» B. No | |
78. |
Global variable are available to all functions. Does there exist a mechanism by way of which it available to some and not to others. |
A. | Yes |
B. | No |
Answer» C. | |
79. |
Is it true that a global variable may have several declarations, but only one definition? |
A. | Yes |
B. | No |
Answer» B. No | |
80. |
Is it true that a function may have several declarations, but only one definition? |
A. | Yes |
B. | No |
Answer» B. No | |
81. |
Which of the following operations are INCORRECT? |
A. | <pre><code class="cpp">int i = 35; i = i%5;</code></pre> |
B. | <pre><code class="cpp">short int j = 255; j = j;</code></pre> |
C. | <pre><code class="cpp">long int k = 365L; k = k;</code></pre> |
D. | <pre><code class="cpp">float a = 3.14; a = a%3;</code></pre> |
Answer» E. | |
82. |
Which of the following correctly represents a long double constant? |
A. | 6.68 |
B. | 6.68L |
C. | 6.68f |
D. | 6.68LF |
Answer» C. 6.68f | |
83. |
Which of the structure is correct?
|
||||||
A. | 1 | ||||||
B. | 2 | ||||||
C. | 3 | ||||||
D. | All of above | ||||||
Answer» B. 2 | |||||||
84. |
Which of the declaration is correct? |
A. | int length; |
B. | char int; |
C. | int long; |
D. | float double; |
Answer» B. char int; | |
85. |
What will be the output of the program?
|
A. | 10 |
B. | 11 |
C. | No output |
D. | Error: ++needs a value |
Answer» E. | |
86. |
Which standard library function will you use to find the last occurance of a character in a string in C? |
A. | strnchar() |
B. | strchar() |
C. | strrchar() |
D. | strrchr() |
Answer» E. | |
87. |
How many times the program will print "IndiaBIX" ?
|
A. | Infinite times |
B. | 32767 times |
C. | 65535 times |
D. | Till stack overflows |
Answer» E. | |
88. |
How will you free the allocated memory ? |
A. | remove(var-name); |
B. | free(var-name); |
C. | delete(var-name); |
D. | dalloc(var-name); |
Answer» C. delete(var-name); | |
89. |
What will be the output of the program?
|
A. | Dogs 12 |
B. | Cats 14 |
C. | Boys 13 |
D. | Apple 12 |
Answer» E. | |
90. |
What will you do to treat the constant 3.14 as a long double? |
A. | use 3.14LD |
B. | use 3.14L |
C. | use 3.14DL |
D. | use 3.14LF |
Answer» C. use 3.14DL | |
91. |
Which of the structure is incorrcet?
|
||||||
A. | 1 | ||||||
B. | 2 | ||||||
C. | 3 | ||||||
D. | 1, 2, 3 | ||||||
Answer» C. 3 | |||||||
92. |
Does there any function exist to convert the int or float to a string? |
A. | Yes |
B. | No |
Answer» B. No | |
93. |
According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments? |
A. | <pre><code class="cpp">int main(int argc, char *argv[])</code></pre> |
B. | <pre><code class="cpp">int main(argc, argv) int argc; char *argv; </code></pre> |
C. | <pre><code class="cpp">int main() { int argc; char *argv; } </code></pre> |
D. | None of above |
Answer» B. <pre><code class="cpp">int main(argc, argv) int argc; char *argv; </code></pre> | |
94. |
Which files will get closed through the fclose() in the following program?
|
A. | "A.C" "B.C" "C.C" |
B. | "B.C" "C.C" |
C. | "A.C" |
D. | Error in |
E. | <i class="C-code">fclose()</i> |
Answer» E. <i class="C-code">fclose()</i> | |
95. |
In a file contains the line "I am a boy r n" then on reading this line into the array str using fgets(). What will str contain? |
A. | "I am a boy r n 0" |
B. | "I am a boy r 0" |
C. | "I am a boy n 0" |
D. | "I am a boy" |
Answer» D. "I am a boy" | |
96. |
Which header file should you include, if you are going to develop a function, which can accept variable number of arguments? |
A. | varagrg.h |
B. | stdlib.h |
C. | stdio.h |
D. | stdarg.h |
Answer» E. | |
97. |
The library function used to find the last occurrence of a character in a string is |
A. | strnstr() |
B. | laststr() |
C. | strrchr() |
D. | strstr() |
Answer» D. strstr() | |
98. |
In the following code snippet can we declare a new typedef named ptr even though struct employee has not been completely declared while using typedef?
|
A. | Yes |
B. | No |
Answer» B. No | |
99. |
What will be the output of the program?
|
A. | 1 |
B. | 0 |
C. | 2 |
D. | red |
Answer» C. 2 | |
100. |
What will be the output of the program?
|
A. | 4, 4, 8 |
B. | 2, 4, 4 |
C. | 4, 4, 2 |
D. | 2, 4, 8 |
Answer» C. 4, 4, 2 | |