1 |
Which of the following statement is correct? |
float num1;num2;
int day,night;
int continue=5.0;
string black='white';
|
2 |
Which is NOT a valid statement to initialize a variable? |
int n=100;
long,population=15000;
char n []="hello World";
cons int N=100;
|
3 |
Which is a valid statement for initializing of a variable? |
int n=100;
int x=50, y=75;
char grade='a'
All of these
|
4 |
A process of assigning initial value to a variable at the time of declaration is called: |
Assigning
Initializing
Naming
setting
|
5 |
Which of the following data types is most appropriate for storing a name? |
float
int
char
long
|
6 |
Which is a valid statement for declaring a variable? |
int marks;
int a,b,c;
Double salary;
All
|
7 |
Which of the following is used to separate each variable while declaring more than one variable on the same line? |
Commas
Colons
Pipes
Semicolons
|
8 |
Which of the following are required to declare a variable? |
keyword
Variable name
Data type
Both b and c
|
9 |
Which of the following statements is NOT legal? |
char ch='b';;
char ch='0'
char ch=65;
char ch="cc"
|
10 |
Another way to write the value 3452211903 is: |
3.452211903e09
3.45221193e-09
3.452211903<span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 16px;">×09</span>
3452211903e09
|
11 |
Which variable should be used to store the value "I want an A in this exam". |
char
int
float
character
|
12 |
The number of bytes used by char data type in C is: |
2
1
121
16
|
13 |
Which of the following data type is used to store string value: |
char
float
string
long
|
14 |
The number of digits after a decimal point is called: |
Significance
Precision
Range
Scope
|
15 |
The exponential notation consists of: |
Mantissa
Exponent
Range
A and B
|