MCQ on Data Types in c

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-Programming-MCQ-Multiple-Choice-Questions

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 foolowing is a predefine data type





ANSWER= (C) int

 

Q.2 What is the size of char data type ?





ANSWER= (C) Both A & B

 

Q.3 What is the size of an int data type?





ANSWER= (B) 2 Byte

 

Q.4 Which of the following is not a basic data type in C language?





ANSWER= (D) real

 

Q.5 Find out the output for the following program

  void main()
  {
  int x=15;
  printf(“%d%d”,x,x++);
  }






ANSWER= (D) 16 15

 

Q.6 —- is range of char data type in c ?





ANSWER= (B) -128 to 127

 

Q.7 Storage size of float data type is —— bytes





ANSWER= (D) 4

 

Q.8 Storage size of int data type is —— bytes





ANSWER= (B) 2

 

Q.9 Storage size of double data type is —— bytes





ANSWER= (C) 8

 

Q.10 Find out the output for the following program

  void main()
  {
  float x = ‘a’;
  printf(“%f”, a);
  }






ANSWER= (C) 97.000000

Explanation ASCII value of a is 97, the same is assigned to the float variable and printed.

 

Q.11 — is an empty data type.





ANSWER= (C) void

 

Q.12 Enumerated data types define using — keyword





ANSWER= (B) enum

 

Q.13 —- value can not be changed during program execution.





ANSWER= (B) Constants

 

Q.14 What is the return_type of sqrt() ?





ANSWER= (D) double

 

Q.15 Find out the output for the following program

  void main()
  {
  int n=1;
  while(n<=5)
  printf(“%d”,++n);
  }






ANSWER= (B) 2 3 4 5 6

 

Q.16 Which datatype will throw an error when we perform modulus operation(%) ?





ANSWER= (C) float

 

Q.17 The format identifier “%i” is used for which datatype ?





ANSWER= (A) int

 

Q.18 Signed and unsigned representataion is available for





ANSWER= (B) int

 

Q.19 Size of a Turbo C C++ Compiler is ?





ANSWER= (A) 16 bit

 

Q.20 Find out the output for the following program

  void main()
  {
  int x=2;
  x+=5
  printf(“%d”,x);
  }






ANSWER= (C) 7

 

Q.21 —- is range of int data type in c ?





ANSWER= (C) -32768 to 32767

1. Official Telegram Click Here
2. Telegram For CSE MCQs Click Here
3. You TubeClick Here
error: Content is protected !!