Question:

Which of the following is not a valid data type in C?

Show Hint

Always use `float` or `double` to represent real numbers in C. `real` is not a valid data type.
  • int
  • float
  • real
  • char
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

In C, there are several primitive data types. The following are the common ones:
`int` is used to store integers.
`float` is used for storing single-precision floating-point numbers.
`char` is used for storing single characters.
However, `real` is not a valid data type in C. In C, for real numbers, the types `float` or `double` are used. The term `real` is commonly used in other languages (like Pascal), but not in C. Thus, the correct answer is (c) real.
Was this answer helpful?
0
0