Consider following program fragment char c ='a' ;
while (c++ < = 'z')
putchar (xxx) ;
If required output is abcd....xyz, then xxx should be
A. | c++ |
B. | c-2 |
C. | c-1 |
D. | --c |
Option: C Explanation : Click on Discuss to view users comments. |
A. | Loop program |
B. | Program trace |
C. | Subroutine program |
D. | None of these |
Option: B Explanation : Click on Discuss to view users comments. |
A. | Switch between functions in a program |
B. | Switch from one variable to another variable |
C. | To choose from multiple possibilities which may arise due to different values of a single variable |
D. | All of above |
Option: C Explanation : Click on Discuss to view users comments. |
Consider following program fragment
if (a > b)
printf("a> b") ;
else
printf ("else part") ;
print f("a< = b") a <= b
will be printed if
A. | a>b |
B. | a < b |
C. | a=b |
D. | All of these |
Option: D Explanation : The else clause has no brackets i.e., {and}. This means the else clause is made up only one statement. So, printf ("a < = b"); will be executed anyway, i.e. if a>b a< = b. Hence the answer Click on Discuss to view users comments. |
Syllabus Covered in this section is
This Section covers Multiple Choice Questions Answers in C Programming . Here questions answers are given with explanation and references. These questions can be used for the preparation of various competitive and academic exams.
Who can benefit -
Various Search Terms used for this section are