TCS
Company
Programming
Output
Predict the output of following code:
main()
{
int a=10,b=20,c=5,d;
d=a
Read Solution (Total 9)
-
- Error will be displayed as semicolon is not there in d=a
- 6 years agoHelpfull: Yes(2) No(0)
- error will be displayed
- 6 years agoHelpfull: Yes(1) No(0)
- Q is incomplete
- 6 years agoHelpfull: Yes(1) No(0)
- Code will execute successfuly
- 6 years agoHelpfull: Yes(0) No(4)
- Error will displayed
- 6 years agoHelpfull: Yes(0) No(0)
- Error will be displayed
- 6 years agoHelpfull: Yes(0) No(0)
- 10 as a's value will get store in d
- 6 years agoHelpfull: Yes(0) No(0)
- Compile-error will be generated as the semicolon after d=a is missing
- 6 years agoHelpfull: Yes(0) No(0)
- ignore errors
if the last line is printf("%d",d);
then d = 10 as a value is stored in d - 3 years agoHelpfull: Yes(0) No(0)
TCS Other Question