Data Types
-  In C++, what is the sign of character data type by default?
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The standard does not specify if plain char is signed or unsigned. There are three distinct character types according to the standard: char, signed char and unsigned char.
 
-  What is the output of this program?
#include
using namespace std;
int main()
{
char ch = 'M';
cout<< ch;
return 0;
} 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: C
M
 
-  How do we represent a wide character of the form wchar_t?
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: D
A wide character is always indicated by immediately preceding the character literal by an L.
 
-  What will be the output of this program?
#include
using namespace std;
int main()
{
char ch = 65;
cout<< ch;
return 0;
} 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The literal value for 65 is A. So it will be printing A.
 
-  Which of the following belongs to the set of character types?
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: D
wchar_t and char is used to represent wide character and character.