Hello students welcome to CSE Study247, Today I am provide you MCQ on Data Types in c.
This page provide 20 Multiple choice question with Answer that is very useful of Computer science students like preparation of many exam Like ( ISRO,DRDO ,Semester, Interview, TCS , Railway & another Government Sector)
C programming is the basic language of programming that help to learn another language. So this MCQ is very useful for you.

C is a general purpose ,high level language that originally developed by Dennis Ritchie to develop the UNIX operating system at Bell labs.
Q.1 Which of the following is a predefined data type?
Array
Pointer
int
union
Explanation
In C, int is a built-in (primitive) data type. Arrays and pointers are derived types, and union is user-defined.
Q.2 What is the size of char data type?
1 Byte
8 Bits
Both A & B
4 Bits
Explanation
In C, char occupies 1 byte, which is equal to 8 bits.
Q.3 What is the size of int data type (Turbo C)?
1 Byte
2 Byte
4 Byte
8 Byte
Explanation
In Turbo C (16-bit compiler), int occupies 2 bytes.
Q.4 Which of the following is not a basic data type in C language?
char
int
float
real
Explanation
real’ is not a valid C data type.
Q.5 Output of the program: void main(){ int x=15; printf('%d %d', x, x++); }
15 15
15 16
16 15
Undefined behavior
Explanation
Order of evaluation of function arguments is unspecified in C, so the output is undefined.
Q.6 What is the range of signed char data type?
-127 to 128
-128 to 127
-32768 to 32767
0 to 255
Explanation
Signed char occupies 1 byte and ranges from -128 to 127.
Q.7 Storage size of float data type is ______ bytes.
1
2
4
8
Explanation
Float occupies 4 bytes in C.
Q.8 Storage size of int data type (Turbo C) is ______ bytes.
1
2
4
8
Explanation
In 16-bit Turbo C compiler, int occupies 2 bytes.
Q.9 Storage size of double data type is ______ bytes.
2
4
8
16
Explanation
Double typically occupies 8 bytes.
Q.10 Output of program: void main(){ float x='a'; printf('%f', x); }
a
0.000000
97.000000
Error
Explanation
Character ‘a’ has ASCII value 97, which is converted to float.
Q.11 ____ is an empty data type.
char
int
void
struct
Explanation
void represents absence of value.
Q.12 Enumerated data types are defined using the ____ keyword.
char
enum
struct
typedef
Explanation
enum keyword defines enumerated data types.
Q.13 ____ values cannot be changed during program execution.
Variable
Constant
Integer
Pointer
Explanation
Constants cannot be modified.
Q.14 Return type of sqrt() function is?
int
float
double
void
Explanation
sqrt() returns double.
Q.15 Which datatype gives error with modulus (%) operator?
int
short
float
long
Explanation
Modulus operator works only with integers.
Q.16 Format specifier '%i' is used for:
int
char
float
double
Explanation
%i is used for integers.
Q.17 Signed and unsigned representation is available for:
float
double
int
void
Explanation
Signed/unsigned applies to integer types.
Q.18 Turbo C/C++ compiler is a:
16-bit
32-bit
64-bit
None
Explanation
Turbo C is a 16-bit compiler.
Q.19 Output of program: void main(){ int x=2; x+=5; printf('%d', x); }
2
5
7
Garbage
Explanation
x+=5 adds 5 to x.
Q.20 Range of int data type (16-bit) is:
-128 to 127
-32768 to 32767
0 to 65535
-2147483648 to 2147483647
Explanation
16-bit signed int range is -32768 to 32767.
| 1. Official Telegram | Click Here |
| 2. Telegram For CSE MCQs | Click Here |
| 3. You Tube | Click Here |