TCS Company Category

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

Read Solution (Total 4)

TCS Other Question

Predict the output of following code:
main()
{
printf(“​ %d​ ”,printf(“​ FACE​ ”)); //valid
}
1.FACE4
2. Error
3. Garbage value
4. FACE
Predict the output of following code:
main()
{
printf(“FACE”+2); ​ // valid skip specified number of
//characters from start
}
1. FACE
2. FA
3. CE
4. Garbage value