1.

What is the size of a character type in C and C++?(a) 4 and 1(b) 1 and 4(c) 1 and 1(d) 4 and 4I had been asked this question in examination.This interesting question is from C++ Concepts in section Basics Concepts of C++ of C++

Answer»

Right choice is (c) 1 and 1

The best explanation: The size of a character type in both C and C++ is 1. You can do PRINTF(“%d”, (int)SIZEOF(char)); in both C and C++ to CHECK this.



Discussion

No Comment Found

Related InterviewSolutions