TCS
Company
Programming
Basics
Predict the output of following code:
main()
{
int x=10,y=-10;
printf(“%x t”,x<>2);
}
1. 28 fffd
2. 40 -3
3. Error
4. 0,1
Read Solution (Total 3)
-
- 3.error because there for operation in c of sysmbol ( )
- 6 years agoHelpfull: Yes(1) No(0)
- "Expression syntax" error will be displayed.
- 6 years agoHelpfull: Yes(0) No(0)
- error: expected expression before ‘>’ token
printf("%x t",x2); - 6 years agoHelpfull: Yes(0) No(0)
TCS Other Question
Predict the output of following code:
main()
{
int a,x=2,3,4,5; // Error because list is not within ( )
a=1,2,3,4,5;
printf(“%d%d”,x,a);
}
1. Error
2. 5,1
3. 2,1
4. 5,5
Predict the output of following code:
main()
{
unsigned int a= -1;
signed int b=10;
if(a