C/C MCQ Quiz Hub

C Programming - MCQ Questions Set 3

Choose a topic to test your knowledge and improve your C/C skills

 A local variable declaration with no storage class specified is by default _________





✅ Correct Answer: 1

Property which allows to produce different executable for different platforms in C is called?





✅ Correct Answer: 3

What is #include <stdio.h>?





✅ Correct Answer: 1

C preprocessors can have compiler specific features.





✅ Correct Answer: 1

C preprocessor is conceptually the first step during compilation.





✅ Correct Answer: 1

Preprocessor feature that supply line numbers and filenames to compiler is called?





✅ Correct Answer: 4

#include <somefile.h> are _______ files and #include “somefile.h” ________ files.





✅ Correct Answer: 4

What is a preprocessor?





✅ Correct Answer: 1

Which of the following are C preprocessors?





✅ Correct Answer: 4

#include statement must be written _____





✅ Correct Answer: 2

 #pragma exit is primarily used for?





✅ Correct Answer: 3

The C-preprocessors are specified with _________symbol.





✅ Correct Answer: 1

What is #include directive?





✅ Correct Answer: 1

The preprocessor provides the ability for ____





✅ Correct Answer: 4

 If #include is used with file name in angular brackets.





✅ Correct Answer: 1

What is the sequence for preprocessor to look for the file within <>?





✅ Correct Answer: 1

Which directory the compiler first looks for the file when using #include?





✅ Correct Answer: 2

What would happen if you create a file stdio.h and use #include “stdio.h”?





✅ Correct Answer: 2

How is search done in #include and #include “somelibrary.h” according to C standard?





✅ Correct Answer: 4

How is search done in #include and #include”somelibrary.h” normally or conventionally?





✅ Correct Answer: 2

Can function definition be present in header files?





✅ Correct Answer: 1

If the file name is enclosed in double quotation marks, then _________





✅ Correct Answer: 1

 If the file name is enclosed in angle brackets, then ___





✅ Correct Answer: 2

Which of the following file extensions are accepted with #include?





✅ Correct Answer: 4

Which of the following names for files not accepted?





✅ Correct Answer: 4

What is the advantage of #define over const?





✅ Correct Answer: 1

In a conditional inclusion, if the condition that comes after the if is true, then what will happen during compilation?





✅ Correct Answer: 1

Conditional inclusion can be used for ______





✅ Correct Answer: 4

For each #if, #ifdef, and #ifndef directive.





✅ Correct Answer: 4

The #else directive is used for _________





✅ Correct Answer: 1

Which of the following can never be sent by call-by-value?





✅ Correct Answer: 2

Which type of variables can have the same name in a different function?





✅ Correct Answer: 4

Arguments that take input by user before running a program are called?





✅ Correct Answer: 3

What is the maximum number of arguments that can be passed in a single function?





✅ Correct Answer: 2

An array of similar data types which themselves are a collection of dissimilar data type are ___________





✅ Correct Answer: 3

Comment on an array of the void data type.





✅ Correct Answer: 4

Which of the following arithmetic operation can be applied to pointers a and b? (Assuming initialization as int *a = (int *)2; int *b = (int *)3;)





✅ Correct Answer: 2

What is the size of *ptr in a 32-bit machine (Assuming initialization as int *ptr = 10;)?





✅ Correct Answer: 3

 Which of following logical operation can be applied to pointers? (Assuming initialization int *a = 2; int *b = 3;)





✅ Correct Answer: 4

Which of the following declaration will result in run-time error?





✅ Correct Answer: 4

Which of the following is not possible statically in C?





✅ Correct Answer: 1

What is the correct syntax to send a 3-dimensional array as a parameter? (Assuming declaration int a[5][4][3];)





✅ Correct Answer: 1

What are the applications of a multidimensional array?





✅ Correct Answer: 4

Which of the following are themselves a collection of different data types?





✅ Correct Answer: 2

User-defined data type can be derived by________





✅ Correct Answer: 4

Which operator connects the structure name to its member name?





✅ Correct Answer: 3

Which of the following cannot be a structure member?





✅ Correct Answer: 2

Which of the following return-type cannot be used for a function in C?





✅ Correct Answer: 4

Which of the following is not possible under any scenario?





✅ Correct Answer: 4

Which of the following operation is illegal in structures?





✅ Correct Answer: 1