github

Made bySaurav Hathi

MCQ Test C/C++: Basic Concepts

Q1:

Which method do we use to append more than one character at a time?

Tags:
Section:
Core Programming
Options:
Q2:

Choose the correct option.
extern int i;
int i;

Tags:
Section:
Core Programming
Options:
Q3:

Pick the right option for following statements.
1) A definition is also a declaration.
2) An identifier can be declared just once.

Tags:
Section:
Core Programming
Options:
Q4:

What is the use of Namespace?

Tags:
Section:
Core Programming
Options:
Q5:

What is the general syntax for accessing the namespace variable?

Tags:
Section:
Core Programming
Options:
Q6:

Variable names beginning with underscore is not encouraged. Why?

Tags:
Section:
Core Programming
Options:
Q7:

Variable name resolving (number of significant characters for uniqueness of variable) depends on

Tags:
Section:
Core Programming
Options:
Q8:

Which of the following is not a valid C variable name?

Tags:
Section:
Core Programming
Options:
Q9:

Which of the following is not a valid variable name declaration?

Tags:
Section:
Core Programming
Options:
Q10:

Which of the following cannot be a variable name in C?

Tags:
Section:
Core Programming
Options:
Q11:

What is the size of an int data type in C++?

Tags:
Section:
Core Programming
Options:
Q12:

Which is correct with respect to size of the datatypes in C/C++?

Tags:
Section:
Core Programming
Options:
Q13:

Result of a logical or relational expression in C is

Tags:
Section:
Core Programming
Options:
Q14:

In C/C++, operation “a = a * b + a” can also be written as:

Tags:
Section:
Core Programming
Options:
Q15:

Which property allows to produce different executables for different platforms in C?

Tags:
Section:
Core Programming
Options:
Q16:

C preprocessor is conceptually the first step during compilation?

Tags:
Section:
Core Programming
Options:
Q17:

What is the output of this C code?

#include <stdio.h>

#define fun(m, n) m * n = 10

int main()

{

printf("In main\n");

}

Tags:
Section:
Core Programming
Options:
Q18:

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

Tags:
Section:
Core Programming
Options:
Q19:

What is preprocessor?

Tags:
Section:
Core Programming
Options:
Q20:

What is the advantage of #define?

Tags:
Section:
Core Programming
Options:
Q21:

Correct syntax to initialize bit-fields in an structure?

Tags:
Section:
Core Programming
Options:
Q22:

Does puts function adds newline character?

Tags:
Section:
Core Programming
Options: