Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 36

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 85

Answer:

main()
{
int i;
printf("%d",scanf("%d",&i)); // value 10 is given as input here
}


Answer:
1


Explanation:
Scanf returns number of items successfully read and not 1/0. Here 10 is given as input which should have been scanned successfully. So number of items read is 1.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 36 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: