Output for following and explanation

J=scanf("%d",&i);
printf("%d",j);

Showing Answers 1 - 9 of 9 Answers

nitin

  • Jan 30th, 2017
 

1, the scanf success return 1 fail return 0.

  Was this answer useful?  Yes

`scanf` returns the number of successful conversions and assignments, or EOF if it hits the end of the input stream before any characters had been read. In this particular case, it will return 1 on success, 0 on a matching failure (the next input character is not a digit), and EOF if theres no input before end of file.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions