Contents

Which of the following datatype is most appropriate for storing a name?
a) float  
b) int                      
c) char  
d) double

c

Which of the following is valid statement for initializing of a variable?
a) int n=100;                        
b) int x=50, y=75;
c) char grade=’a’
d) all of these

d

Which of the following is a valid statement to initialize a variable?
a) int=100;           
b) long population=15000;
c) char n []=”Hello World”;              
d) const int N=100;

a

Which of the following statement is correct?
a) float num1, num2; 
b) int day, night;
c) int continue=5.0;               
d) string black=’white’;

b

Which of the following constant definitions is correct?
a) const float PRICE=3500;
b) const int age=36;
c) const float COST=700.0;             
d) const MY_HEIGHT=60/12;

d

Which of the following can be used as character constant?
a) characters                        
b) digits
c) special characters
d) all of these

d