C Programming Multiple Choice Questions (MCQ) | IT Developer <?php echo $page_title; ?>
IT Developer

C Programming Multiple Choice Questions (MCQ)

C Programming Multiple Choice Questions (MCQ) - Set 7



Share with a Friend

Multiple Choice Questions


C Programming - Multiple Choice Questions (MCQ) - Set 7

31. Which of the following is a valid relational operator?
A). =
B). =>
C). ==
D). >>
View Answer
Correct: C




32. What will be the value of variable a?
float a = 3.5 + 4.5;
A). a = 8.0
B). a = 8
C). a = 7
D). a = 0.0
View Answer
Correct: A




33. If we want to increment the value of sum by 1. Which of following should be used?

A). sum++;
B). sum = sum+1;
C). sum += 1;
D). all of above
View Answer
Correct: D




34. What will be the value of variable a?
int a = 3.5 + 4.5;

A). a = 0
B). a = 7
C). a = 8
D). a = 8.0
View Answer
Correct: D




35. Choose a right statement
int a = 5/2;
int b = 5.0/2;
int c = 5 / 2.0;
int d = 5.0/2.0;

A). a = 2, b = 2, c = 2, d= 2
B). a = 2, b = 2.0, c = 2, d= 2.0
C). a = 2, b = 2.5, c = 2.5, d= 2.5
D). a = 2.5, b = 2.5, c = 2.5, d= 2.5
View Answer
Correct: A