UGC-NET June CS 2019 Paper 1
November 29, 2023UGC-NET June CS 2019 Paper 1
November 29, 2023Question 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.
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.
i5h4g3f2el
14h3g2f1e0
An error message
None of the above
Subscribe
Login
0 Comments