C Technical Interview Questions On Datatypes – Objective Type

These C Technical Interview Questions Datatypes post providing basic, intermediate and Hard level examples in C data types. The practice of these examples makes you good in C programming.


What is Datatype?

  1. Represents size of data
  2. Represents type of data
  3. It is a keyword
  4. All of above
  5. Both 1 and 3

Answer :

Ans : 4 ; All of the above are true in case of Data type

What is an unsigned integer?

  1. Used to represent only positive integers
  2. Used to represent both positive and negative integers
  3. No such keyword in C
  4. None of the above.

Answer :

Ans : 1 ; Using unsigned keyword, we represents positive values only

Is data type pre-defined or user defined?

  1. Pre-defined
  2. User-defined
  3. Both 1 and 2
  4. None of the above

Answer :

Ans : 3 ;

What is size_t?

  1. Represents positive integer value
  2. Represents signed_int
  3. Neither 1 nor 2
  4. No such data_type in C

Answer :

Ans : 1 ; size_t represents unsigned int value, we can see in the prototype of strlen(), malloc(), realloc() and calloc() in Dynamic memory allocation

What sizeof() operator returns?

  1. Returns size in bytes
  2. Return as size_t
  3. Both 1 and 2
  4. Neither 1 nor 2

Answer :

Ans : 3 ; Returns size in bytes and size is always positive integer value, hence option-2 is also correct

Which data type holds only homogenous elements?

  1. Array
  2. String
  3. Structure
  4. Both 1 and 2
  5. Both 1 and 3

Answer :

Ans : 4 ; Both Array and String(character array) holds only homogenous elements

What is coming under user-defined data type?

  1. Array
  2. Union
  3. Structure
  4. Both 1 and 3
  5. Both 2 and 3

Answer :

Ans : 5 ; Unions and Structures are user-defined data types in C language

What is the size of the void?

  1. 1 byte
  2. 4 bytes
  3. unknown
  4. 1 bit

Answer :

Ans : 3 ; No size for void in C language

Pick out the odd sentence :

  1. The primitive variable holds data.
  2. Array variables holds address
  3. Pointer variable holds address
  4. None of the above choose.

Answer :

Ans : 4 ; All of the above are true

what is correct sentence among following:

  1. Variable can be declared without data type.
  2. Structure is derived data type
  3. size_t is a data type
  4. None of the above

Answer :

Ans : 3 ; size_t is a data type, that represents only positive integers

>C Technical Interview Questions – Datatypes – Objective Type Part 2 <

Share this