Which of the following datatype is most appropriate for storing a
name?
a) float
b) int
c) char
d) double
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
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;
Which of the following statement is correct?
a) float num1, num2;
b) int day, night;
c) int continue=5.0;
d) string black=’white’;
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;
Which of the following can be used as character constant?
a) characters
b) digits
c) special characters
d) all of these