C Multiple Choice Questions – Test Your Skills in Just 4 Mins

When you can’t measure, your knowledge is meager and unsatisfactory. Lord Kelvin

Today, quizzes are the best way to examine knowledge. You can enhance the fundamental skills with “C Multiple Choice Questions (MCQ’s)”. These C Quiz Questions cover all the important topics, which plays a major role in interviews and placements.

So, what are you waiting for?

Take this challenge and prove yourself.

C Multiple Choice Questions

Q.1 In the declaration given below, what is “array”?
int array[20]; 

Correct! Wrong!

Q.2 What is the most preferred function to read a string in C?

Correct! Wrong!

Q.3 Which of the following is treated as a real number by default?

Correct! Wrong!

Q.4 Which of the following in C is analogous to dictionaries in Python?

Correct! Wrong!

Q.5 Predict the output of the following code segment:
// Add stdio.h and stdbool.h header files in below code

int main()
{

bool arr[10] = { true, false };
printf( "%ld\n",sizeof(bool) );
return 0;

}

Correct! Wrong!

Q.6 Predict the output of the following code segment:
// Add stdio.h header file in below code

void function(int **p)
{
printf("%d", **p);
}
int main()
{
int array[2][1] = {10, 20, 30, 40, 50, 60, 70, 80};
int *pointer;
pointer = &array[2][2];
function(&pointer);
return 0;
}

Correct! Wrong!

Q.7 Predict the output of the following code segment:
// Add stdio.h header file in below code

int main()
{
const int limit = 10;
limit++;
printf("%d", limit);
return 0;
}

Correct! Wrong!

Q.8 Predict the output of the following code segment:
// Add stdio.h header file in below code

int main()
{
int number1 = -17;
int number2 = -5;
int result = number1 % number2;
printf("%d",result);
return 0;
}

Correct! Wrong!

Q.9 Predict the output of the following code segment:
// Add stdio.h header file in below code

int main () 
{ 

char line [] = "Welcome to DataFlair tutorials on C Programming"; 

char string1[10], string2[10], string3[10];

sscanf (line,"%*s %*s %s %*s %*s %s %s",string1, string2, string3);       
printf ("%s %s %s \n", string1, string2, string3);
return 0; 
}

Correct! Wrong!

Q.10 Which mathematical function would you use to round off 4.23 to 5?

Correct! Wrong!

Q.11 Which of the following is not necessary for every C program?

Correct! Wrong!

Q.12 Which of the following statements is incorrect about macros?

Correct! Wrong!

Congratulation!

Hope, you scored well in our “C Multiple Choice Questions”. If not, you must refer a complete “C tutorial series” offered by DataFlair.

All the queries and suggestions are welcomed in the comment section.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.