Sunday, September 5, 2010

Objective type C & C++ Questions

Q1. An identifier in C
a. is a name of a thing such as variable and function
b. is made up of letters, numerals and the underscore
c. can obtain both upper case and lower case letter
d. all of the above
e. none of the above

Q2. The math library is setup for the user by the file
a. float.h
b. limits.h
c. math.h
d. time.h
e. none of the above

Q3. Which of the following does not have an unary operator ?
a. -7 b. ++i
c. j d. all of the above
e. none of the above

Q4. Assume x, y and z are floating point variables and they have been assigned the values x=8.8, y=3.5, z= -5.2 . The value of arithmetic expression 2*x/(3*y) is
a. 2.000000
b. 1.600000
c. 1.676190
d. 0.676190
e. none of the above

Q5. The two operators && and || are
a. arithmetic operators
b. equality operators
c. logical operators
d. relational operators
e. none of the above

No comments: