Multiple Choice Questions 2
The constant 0.15e+6 represents the same value as _______.
150000.0
6.15
0.75
0.21
None of the above.
What would be printed by the following program ? ( The symbol '#' stands for one blank character.)
int main(void)
{
double a, b;
a = 37.56;
b = 101.117;
printf("Is it %6.1f%9.4f", a, b);
printf("?\n");
return (0);
}
Is#it##37.6#101.1170?\n
Is#it##37.6#101.1170?
Is#it##37.5#101.1170?
Is#it##37.6#101.117?\n
None of the above.
If num is a variable of type int and temp is a variable of type double, how could you correctly complete this function call?
scanf("%1f%d",_______);
num, temp
&num, &temp
temp, num
&temp, &num
None of the above.
Which of the following are valid identifiers ?
i. R3D3
ii. per-capita
iii. phone#
iv. ice_cream
v. 92_aardvarks
i, ii, iv, v
i, iv
i, ii
ii, iv, v
All are valid.
The program language C was developed by
John von Neumann
John Atanasoff
Niklaus Wirth
Dennis Ritchie
Guy Steele
______ is a set of values and a set of operations on those values.
file
data type
precedence rule
library
language standard
Which of the following expression does not evaluate to 3 ?
2 + 16 % 5
7 - 15 / 4
6 * 5 / 10
2 - 4 * 3 + 26 / 2
8 - 5
The ANSI standard for the C language was approved in ______.
1968
1972
1979
1984
1989
Which of the following expression has the value 0 if and only if the value of N is divisible by 20 ?
syntax errors
run-time errors
result errors
arithmetic faults
all of the above
A program that uses prompting messages to direct the user's input is running in _____.
batch mode
arithmetic/logic mode
interactive mode
assembly language mode
memory mode
Visited
times since 26 Aug 1998.