Monday, September 6, 2010

Technical Questions for PSU's

1. The operators << (left shift) and >> (right shift) are
a. assignment operators
b. relational operators
c. logical operators
d. bitwise logical operators

Ans: d

2. The values that can legally appear to the right of the assignment operator are called
a. rvalues
b. int values
c. variables
d. constants

Ans: a

3. The string containing certain required formating information is called
a. argument
b. character array
c. character string
d. control string

Ans: d

4. In C, the NULL statement which does nothing is just
(a.) a., (b) ;
(c) : (d) .

Ans: (b)

5. The general form of do-while statement is
a. do expression while statement;
b. do while expression;
c. do statement while expression;
d. do statement while statement;

Ans: c

6. The two statement that can be used to change the flow of control are
a. if and switch
b. if and while
c. switch and do-while
d. break and continue

Ans: a

7. In printf(), the appearance of the output can be affected by
a. field width
b. conversion character
c. flag
d. all of the above
e. none of the above

Ans: d

8. The conversion character 's' for data input means that the data item is
a. an unsigned decimal integer
b. a short integer
c. a hexadecimal integer
d. a string followed by whitespace character

Ans: d

9. The conversion character for data input which indicates that the data item is a floating-point values is
(a) f
(b) g
(c) e
(d) All of the above

Ans: d

10. The conversion character 'i' for data output means that the data item is displayed as -
(a) a floating point value with an exponent
(b) an unsigned decimal integer
(c) a signed decimal integer
(d) an octal integer

Ans: c

No comments: