input/output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trin12345
    New Member
    • Jun 2012
    • 2

    input/output

    int main()
    {
    int i;
    printf("%d\n",s canf("%d,&i"));
    return 0;
    }
    if value 25 is supplied to scanf(),what will be the answer

    pls dont write the solution only but explain as well

    thanks in advance
  • divideby0
    New Member
    • May 2012
    • 131

    #2
    assuming scanf("%d, &i") is a typo, it would print the number of successfully converted and stored items returned by scanf.

    the output would be 1 if scanf stored the input 0 otherwise.

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      Refer to the definition of standard library function scanf to see what value it returns.

      Comment

      Working...