C
Programming and Technical
Programming
Program
#include
void main()
{
int a,b;
scanf("%d%d",&a&b);
printf("%d*%d%d",a,b);
}
output?
Read Solution (Total 14)
-
- depends on input:ex: 5,3
o/p will be 5*33 - 10 years agoHelpfull: Yes(4) No(1)
- There is one error in scanf("%d%d",&a&b); There should be a space between &a and &b. However avoiding the error if we are to find the solution then it will depend on the input provide. For example I provide 5 and 6 as input, then the result displayed will be
5*30 where 0 will be automatically included. - 10 years agoHelpfull: Yes(3) No(2)
- Depends on the input
if input is 12, 3
then
op- 12*3(Garbage) - 10 years agoHelpfull: Yes(2) No(2)
- lots of error...
scanf is not necessary
If the printf has a valid arguments for a and b, then it will print the right value of a followed by * then followed by garbage values of b - 10 years agoHelpfull: Yes(1) No(0)
- if a=3,b=5
3*5garbage - 9 years agoHelpfull: Yes(1) No(0)
- multiplation of two number is print not garbage
- 10 years agoHelpfull: Yes(0) No(1)
- it will show error because in scanf() there will be comma(,)btween &a and &b
- 10 years agoHelpfull: Yes(0) No(1)
- error
it will give syntax error on compiling it - 10 years agoHelpfull: Yes(0) No(0)
- This gives error in printf, too few arguments for format
- 10 years agoHelpfull: Yes(0) No(0)
- First of all there is an error in the scanf() statement.There must be a comma ( , ) between &a and &b.
Avoiding this error the output will be the value of a,* and two times the value of b.
For example,
If you give 4 & 5 as the value of a & b respectively then the O/P is 4*55 - 10 years agoHelpfull: Yes(0) No(0)
- depend on inputs
for ex a=2,b=3
out put is 2*3 - 10 years agoHelpfull: Yes(0) No(1)
- if u enter 2 and 5 then output=2*5 and some garbage value
i.e 2*5garbage=2*52131232123 - 9 years agoHelpfull: Yes(0) No(0)
- it gives an error.because there is no space between &a and &b
- 9 years agoHelpfull: Yes(0) No(0)
- output depends on inputs for ex- a=3 and b=10 then output is :
3*3with random number due to extra %d - 9 years agoHelpfull: Yes(0) No(0)
C Other Question