Monday, September 6, 2010

Objective Questions of 'C'

1. Precedence determines which operator
a. is evaluated first
b. is most important
c. is fastest
d. operates on the largest number

Ans: a

2. A expression contains relational assignment and arithmetic operator. In the absence of parentheses, the order of evaluation will be

a. assignment, relational, arithmetic
b. arithmetic, relational, assignment
c. relational, arithmetic, assignment
d. assignment, arithmetic, relational

Ans: b

3. The commands that send or "redirect" output of a program to a disk file or another system device such as the printer are

b. [and]
c. /* and /*
d. ( and )

Ans: a

4. Which of the following scanf() statements is true ?
a. scanf("%f', float-var-name);
b. scanf("%d ∑");
c. scanf("%d", &int-var-name);
d. scanf("%d", &number);

Ans: d

5. The meaning of conversion character h for data input is
a. data item is an unsigned decimal integer
b. data item is a short integer
c. data item is a hexadecimal integer
d. data item is a string folowed by a whitespace character

Ans: b

No comments: