Online C Programming Test – Free MCQ’s to test your C Skills

Are you looking for a test to help you analyze how much you know about C programming? You have landed on the right page. This Online C Programming Test is specially designed for you by industry experts. This C Quiz will help you to boost your confidence and help you to face any challenge.

Hope you scored well in our C Multiple Choice Questions (MCQ); now, it’s time to face the second level. Revise all the important concepts with this C Programming Quiz.

All the best!!

Online C Programming Test

Q.1 Which of the following has a global scope in the program?

Correct! Wrong!

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

int main()
{
int array[10] = {3, 0, 8, 1, 12, 8, 9, 2, 13, 10};
int x, y, z;
x = ++array[2];
y = array[2]++;
z = array[x++];
printf("%d %d %d", x, y, z);
return 0;
}

Correct! Wrong!

Q.3 Which of the following statements about functions is false?

Correct! Wrong!

Q.4 What is the correct way of treating 9.81 as a long double?

Correct! Wrong!

Q.5 Which function would you use to convert 1.98 to 1?

Correct! Wrong!

Q.6 Which of the following statements about the null pointer is correct?

Correct! Wrong!

Q.7 Which of the following statements about unions is incorrect?

Correct! Wrong!

Q.8 What is the range of double data type for a 16-bit compiler?

Correct! Wrong!

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

int main()
{
int x = 6;
int y = 4;
int z;
if(!x >= 5)
y = 3;
z = 2;
printf("%d %d", z, y);
return 0;
}

Correct! Wrong!

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

int main()
{
int a,b,c;
a = b = c = 10;
c = a++ || ++b && ++c;
printf("%d %d %d",c, a, b);
return 0;
}

Correct! Wrong!

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

#define PRODUCT(x) (x*x*x*x)
int main()
{
int x = 2;
int result = PRODUCT(x++);
printf("%d %d", x, result);
return 0;
}

Correct! Wrong!

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

int  main() 
{ 
unsigned int a = -1; 
int b = ~0; 
int result;
if (b == a)
printf("equal");
else
printf("unequal"); 
return 0; 
}

Correct! Wrong!

Hope you liked this online C programming test. But this is not the end; prepare yourself for the next level with our advanced level of C Quiz.

If you have any queries and suggestions, share them with us!

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.