Ad
Sponsored by Sir Tauqeer
CLICK HERE TO JOIN SIR TAUQUEER WHATSAPP GROUP
FOR PREPARATION CLASSES AND JOBS UPDATES
Join Now

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

A. Long Long
B. long double
C. Using float
D. Wchar-t
Correct Answer: C. Using float

The correct answer is C: Using float because it is not a valid data type in C/C++. In C/C++, float is a valid fundamental data type used to store single-precision floating-point numbers. However, the phrase "Using float" itself is not a data type. It describes an action or a way to declare a variable, such as float myVariable;, but it doesn't represent a distinct type identifier on its own.

  • A: Long Long is an incorrect option because long long (or long long int) is a perfectly valid fundamental data type in C/C++ (introduced in C99 and C++11). It is used to store integers that require a larger range than a standard long int, typically occupying 64 bits.
  • B: long double is an incorrect option because long double is a valid fundamental data type in C/C++. It is used to store extended-precision floating-point numbers, offering greater precision and range than double.
  • D: Wchar-t is an incorrect option because wchar_t is a valid fundamental data type in C/C++. It is designed to store wide characters, which are characters that may require more than one byte to represent, such as those found in Unicode character sets.

Leave a Comment

Join Our WhatsApp Channel ×
Scroll to Top