...
Question 6980 – UGC-NET June CS 2019 Paper 1
November 29, 2023
Question 6981 – UGC-NET June CS 2019 Paper 1
November 29, 2023
Question 6980 – UGC-NET June CS 2019 Paper 1
November 29, 2023
Question 6981 – UGC-NET June CS 2019 Paper 1
November 29, 2023

Question 1781 – Nielit Scientific Assistance IT 15-10-2017

The following program fragment prints
int i=5;
do
{
putchar(i+100);
printf(“%d”,i–);
}
while(i);

Correct Answer: A

Question 13 Explanation: 
Here, i=5 and putchar(i+100) it means actually putchar(5+100) ⇒ putchar(105);
It will print the ASCII equivalent of 105 which is lower case ‘ i ‘. The printf statement prints the current value of i. i.e. 5 and then decrements it. So, h4 will be printed in the next pass. This
continues until ‘ i ‘ becomes 0, at which point the loop gets terminated.
A
i5h4g3f2el
B
14h3g2f1e0
C
An error message
D
None of the above
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!