TCS Company Programming Program

Predict the output of following code:
main()
{
printf(“​ %d​ ”,printf(“​ FACE​ ”)); //valid
}
1.FACE4
2. Error
3. Garbage value
4. FACE

Read Solution (Total 23)

TCS Other Question

Predict the output of following code:
main()
{
100; ​ // valid but no effect
printf(“%d”,100);
}
1.Error
2. 100
3. Garbage value
4. 100100
Which of the following expressions results in 45.37?

(int)(45.378 * 100) / 100
2.5
(int)(45.378 * 100) / 100.0
(int)(45.378 * 100 / 100)
(int)(45.378) * 100 / 100.0
(int)(45.378) * 100f / 100.0