TCS
Company
Programming
Output
When we execute the given code after giving input, which output is displayed?
int main()
{
int a, b, c;
printf("Enter value of a & bn");
c = scanf("%d",&a,&b);
printf("%d",c);
getch():
return 0;
}
Read Solution (Total 8)
-
- The output will be ERROR. Cause, in the "scanf" line there are too many arguments for format, and there will be a "semicolon" after "getch".
- 3 years agoHelpfull: Yes(3) No(0)
- 1
since, scanf() function return 1. - 3 years agoHelpfull: Yes(0) No(0)
- Firstly in output window
Enter value of a and bn
It will print only a value,b value is not stored . - 3 years agoHelpfull: Yes(0) No(0)
- Enter value of a&bn1
- 2 years agoHelpfull: Yes(0) No(0)
- 1
scanf() returns the no. of input is read by it. - 2 years agoHelpfull: Yes(0) No(0)
- Syntax error
- 2 years agoHelpfull: Yes(0) No(0)
- Syntax error
- 1 year agoHelpfull: Yes(0) No(0)
- it give error
- 1 year agoHelpfull: Yes(0) No(0)
TCS Other Question