TCS

# C Language MCQ’S | Declarations and Initializations 6

Exercise :: Declarations and Initializations – General Questions
Declarations and Initializations – General Questions
Declarations and Initializations – Find Output of Program
Declarations and Initializations – Point Out Errors
Declarations and Initializations – Point Out Correct Statements
Declarations and Initializations – True / False Questions
Declarations and Initializations – Yes / No Questions

26.
Which of the following statements should be used to obtain a remainder after dividing 6.34 by 3.1 ?

A. rem = 6.34 % 3.1;
B. rem = modf(6.34, 3.1);
C. rem = fmod(6.34, 3.1);
D. Remainder cannot be obtain in floating point division.

27.
How would you round off a value from 1.66 to 2.0?

A. ceil(1.66)
B. floor(1.66)
C. roundup(1.66)
D. roundto(1.66)

28.
Which of the following is not user defined data type?
1 :
struct book
{
int roll;
char name[10];
float per;

};
2 :
long int a = 2.35;
3 :
enum day {Sun, Mon, Tue, Wed};

A. 1
B. 2
C. 3
D. Both 1 and 2

29.
Range of float is -2.25e+308 to 2.25e+308

A. True
B. False

30.
By default a real number is treated as a

A. float
B. double
C. long double
D. far double

Important Pages