The data type of the variable “var1” declared in the following ‘C’ language…

2017

The data type of the variable “var1” declared in the following ‘C’ language statement is:
unsigned var1;

  1. A.

    int

  2. B.

    double

  3. C.

    char

  4. D.

    float

Attempted by 673 students.

Show answer & explanation

Correct answer: A

The correct answer is Option A (int). In C programming, using the type modifier unsigned alone implicitly defaults to an unsigned int data type. Therefore, the declaration unsigned var1; allocates memory size and storage behavior identical to a standard unsigned integer.

Explore the full course: Coal India Management Trainee