MCQOPTIONS
Saved Bookmarks
This section includes 1331 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 1301. |
The output of the following is int a = 75; printf (“%d%%”, a); |
| A. | 75 |
| B. | 75%% |
| C. | 75% |
| D. | None of the above |
| Answer» E. | |
| 1302. |
The following statement displays float x = 2000.53; printf (“%e”, x); |
| A. | 2.00053e+04 |
| B. | 2.00053e+03 |
| C. | 2.00053+e04 |
| D. | 2.0005e+03 |
| Answer» C. 2.00053+e04 | |
| 1303. |
The function fprintf is used in a program |
| A. | When too many printf calls have been already used in the program |
| B. | In place of printf, since printf uses more memory |
| C. | When the output is to be printed on to a file |
| D. | When the type of variables to be printed are not known before |
| Answer» D. When the type of variables to be printed are not known before | |
| 1304. |
It is necessary to declare the type of function in the calling program if |
| A. | Function returns an integer |
| B. | Function returns a non-integer value |
| C. | Function is not defined in the same file |
| D. | Function is called number of times |
| Answer» C. Function is not defined in the same file | |
| 1305. |
The break statement causes an exit |
| A. | Only from the innermost loop |
| B. | Only from the innermost switch |
| C. | From the innermost loop or switch |
| D. | From the program. |
| Answer» D. From the program. | |
| 1306. |
What will happen if the following loop is executed ? int num = 0; do { --num; printf(“%d”, num); num++; }while (num >= 0); } |
| A. | The loop will run infinite number of times |
| B. | The program will not enter the loop |
| C. | There will be a compilation error |
| D. | There will be runtime error |
| Answer» D. There will be runtime error | |
| 1307. |
The library function sqrt( ) operates on a double precision argument. If, i is an integer variable, which one of the following calls would correctly compute sqrt(i) ? |
| A. | sqrt((double)i) |
| B. | (double) sqrt(i) |
| C. | (double) (sqrt(i)) |
| D. | sqrt(i) |
| Answer» B. (double) sqrt(i) | |
| 1308. |
To access a structure element using a pointer, ............... operator is used |
| A. | dot (.) |
| B. | pointer (&) |
| C. | pointer (*) |
| D. | arrow (→) |
| Answer» E. | |
| 1309. |
If an array is used as function argument, the array is passed |
| A. | by value |
| B. | by reference |
| C. | by name |
| D. | the array cannot be used as a function argument |
| Answer» C. by name | |
| 1310. |
.................. is a named location in memory that is used t hold the value that may be modified by the program. |
| A. | Expression |
| B. | Keyword |
| C. | Variable |
| D. | Identifiers |
| Answer» D. Identifiers | |
| 1311. |
f an integer occupies 4 bytes and a character occupies 1 bytes of memory, each element of the following structure would occupy how many bytes ? struct name { int age; char name [20]; } |
| A. | 5 |
| B. | 24 |
| C. | 21 |
| D. | 22 |
| Answer» C. 21 | |
| 1312. |
A ................. defines a new type that links code and data. |
| A. | array declaration |
| B. | class definition |
| C. | pointer declaration |
| D. | variable declaration |
| Answer» C. pointer declaration | |
| 1313. |
................. is referred to fixed value that the program may not alter. |
| A. | Expression |
| B. | Variable |
| C. | Constant |
| D. | Keywords |
| Answer» D. Keywords | |
| 1314. |
A ................. storage specifier is originally applied to variables of type int, char, pointers. |
| A. | auto |
| B. | static |
| C. | extern |
| D. | register |
| Answer» E. | |
| 1315. |
................ is referred to fixed value that the program may not alter. |
| A. | Expression |
| B. | Variable |
| C. | Constant |
| D. | Keywords |
| Answer» D. Keywords | |
| 1316. |
................ variables are permanent variables within their own function or file. |
| A. | Auto |
| B. | Static |
| C. | Extern |
| D. | Register |
| Answer» C. Extern | |
| 1317. |
The compilers convert all operands up to the type of the largest operand are called as ................... |
| A. | expression |
| B. | evaluaton |
| C. | typeconversion |
| D. | precence |
| Answer» D. precence | |
| 1318. |
The general form, of assignment operator is ............... |
| A. | variable_name=expression. |
| B. | datatype=expression. |
| C. | variable=expression. |
| D. | datatype=expression1 |
| Answer» B. datatype=expression. | |
| 1319. |
Local variables are also called as ................ variables. |
| A. | global |
| B. | external |
| C. | scope |
| D. | automatic |
| Answer» E. | |
| 1320. |
Variables that are declared inside a function are called as ............... |
| A. | external |
| B. | global |
| C. | scope |
| D. | local |
| Answer» E. | |
| 1321. |
The name of the variables, functions, labels and other user defined object are called ................. |
| A. | expression |
| B. | identifier |
| C. | pointer |
| D. | statemen |
| Answer» C. pointer | |
| 1322. |
If a is an integer variable, a = 5/2; will return a value |
| A. | 2.5 |
| B. | 3 |
| C. | 2 |
| D. | 0 |
| Answer» D. 0 | |
| 1323. |
Which of the following statements is false ? |
| A. | Each new C instruction has to be written on a separate line |
| B. | Usually all C statements are entered in small case letters |
| C. | Blank spaces may be inserted between two words in a C statement |
| D. | Blank spaces cannot be inserted within a variable name |
| Answer» B. Usually all C statements are entered in small case letters | |
| 1324. |
Which of the following is allowed in a C Arithmetic instruction? |
| A. | [ ] |
| B. | { } |
| C. | ( ) |
| D. | None of the above |
| Answer» D. None of the above | |
| 1325. |
In b = 6.6 / a + 2 * n; which operation will be performed first? |
| A. | 6.6 / a |
| B. | a + 2 |
| C. | 2 * n |
| D. | Depends upon compiler |
| Answer» E. | |
| 1326. |
Which of the following shows the correct hierarchy of arithmetic operators in C ? |
| A. | **, * or /, + or - |
| B. | **, *, /, +, - |
| C. | **, /, *, +, - |
| D. | / or *, - or + |
| Answer» E. | |
| 1327. |
Which of the following statement is wrong ? |
| A. | mes = 123.56; |
| B. | con = T * A; |
| C. | this = T * 20; |
| D. | 3 + a = b; |
| Answer» E. | |
| 1328. |
A C variable cannot start with ............. |
| A. | An alphabet |
| B. | A number |
| C. | A special symbol other than underscore |
| D. | Both (B) & (C) above |
| Answer» E. | |
| 1329. |
The maximum value that an integer constant can have is ................. |
| A. | -32767 |
| B. | 32767 |
| C. | 1.7014e+38 |
| D. | –1.7014e+38 |
| Answer» C. 1.7014e+38 | |
| 1330. |
Which of the following is NOT a character constant? |
| A. | Thank You’ |
| B. | ‘Enter values of P, N, R’ |
| C. | ‘23.56E-03’ |
| D. | All the above |
| Answer» E. | |
| 1331. |
The statement char ch = ‘Z’ would store in ch : |
| A. | The character Z |
| B. | ASCII value of Z |
| C. | Z along with the single inverted commas |
| D. | Both (A) and (B) |
| Answer» C. Z along with the single inverted commas | |