C-Programming

Here are some MCQs on C-Programming

1. Which of the following is not a valid data type in C?

a) Double

b) Real

c) Float

d) Char

View Answer >

2. In C, what is the size of the character data type?

a) 2 bytes

b) 4 bytes

c) 8 bytes

d) 1 byte

View Answer >

3. What is the output of the following code snippet?

#include<stdio.h>

int main()

{

   printf(“%d”, sizeof(int));

   return 0;

}

a) 4

b) 2

c) 8

d) 1

View Answer >

4. Which of the following is the correct syntax to declare a variable in C?

a) variableName variableType;

b) variableType variableName;

c) variableType = variableName;

d) variableName = variableType;

View Answer >

5. What is the output of the following code snippet?

#include<stdio.h>

int main()

{

   int x = 5;

   int y = 3;

   printf(“%d”, x++ + –y);

   return 0;

}

a) 6

b) 8

c) 7

d) 5

View Answer >

Leave a Comment

Note:- All Study Material Job Notice/Results/Exams/Marks/Admit Card published on this website is only for immediate information purpose. This information is not to be a Legal Document/Information. If in case any mistake, error and maybe wrong, then this website is not responsible. WE DONT HAVE ANY YOUTUBE CHANNEL.