1.

What is the size of a boolean variable in C++?(a) 1 bit(b) 1 byte(c) 4 bytes(d) 2 bytesThe question was asked by my school principal while I was bunking the class.My question is from C++ Concepts topic in chapter Basics Concepts of C++ of C++

Answer»

The correct option is (a) 1 bit

The EXPLANATION: BOOLEAN uses only 1 bit as it STORES only TRUTH values which can be true(1) or FALSE(0).



Discussion

No Comment Found

Related InterviewSolutions