C-Programming

WhatsApp Channel Join Now
Telegram Group Join Now

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 >

WhatsApp Channel Join Now
Telegram Group Join Now
                                                   

Leave a Comment

telegram Join Telegram
Join Now Join Now