C Programming Data Type Multiple choice question

Exercise : - Multiple Choice Question On C Programming, MCQ C Programming Data type

This section contains a lot of c programming question and answer with explanation on the topic data type. These question and answer are very much helpful for interview(campus interviews, walkin interviews, company interviews), competitive examination ,entrance test and placements. Each question having answer and explanation that would help you to understand easily. These question are designed from basic to advance level. So anyone can learn from here (beginner, fresher, engineering graduate, an experienced IT professional).

All the question of c programming are listed below on data type along with detailed explanation / solution and answer.

1) The format identifier ‘%i’ is also used for _____ data type?
A. char
B. int
C. float
D. double

Answer:

int

Option:

( B )


Explanation :

Both %d and %i can be used as a format identifier for int data type.


2) Which data type is most suitable for storing a number 65000 in a 32-bit system?
A. int
B. long
C. double
D. short

Answer:

short

Option:

( D )


Explanation :

65000 comes in the range of short (16-bit) which occupies the least memory.


3) Which of the following is a User-defined data type?
A. typedef int Boolean;
B. typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;
C. struct {char name[10], int age};
D. All of the Above

Answer:

All of the Above

Option:

( D )


Explanation :

typedef and struct are used to define user-defined data types.


4) What is the size of an int data type?
A. 4 Bytes
B. 8 Bytes
C. Depends on the system/compiler
D. Cannot be determined.

Answer:

Depends on the system

Option:


Explanation :

The size of the data types depend on the system.


5) What is short int in C programming?
A. Basic data type of C
B. Qualifier
C. short is the qualifier and int is the basic datatype
D. None of Above.

Answer:

short is the qualifier and int is the basic datatype

Option:

( C )


Explanation :

No explanations available for this question.