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 11



Share with a Friend

Multiple Choice Questions


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

51. What will be the value of variable c?
int c = 2 ^ 3;

A). 1
B). 8
C). 9
D). 0
View Answer
Correct: A




52. Which of the following is ternary operator?
A). ??
B). :?
C). ?:
D). ::
View Answer
Correct: C




53. What will be the output of following program
 #include 
 main() 
 { 
                 int x,y = 10; 
                  x = y * NULL;
                  printf("%d",x);
 }
A). error
B). 0
C). 10
D). garbage value
View Answer
Correct: A




54. What will be the output of following code.
 { 
        int x = 10, y=15; 
        x = x++; 
        y = ++y; 
       printf(ā€œ%d, %d \nā€ , x, y); 
 } 
A). 10, 15
B). 10, 16
C). 11, 16
D). 11, 15
View Answer
Correct: B




55. Which of following is not a valid assignment expression?
A). y = 22;
B). s = x;
C). y % = 6;
D). z = 5 = 3;
View Answer
Correct: D