Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Tuesday 6 July 2021

Interview Hack#39 Answer

What will be the output of the program if value 25 given to scanf()?

  1. 25
  2. 2
  3. 1
  4. 5
  5. None Of the Above Option

Correct answer 3) 1

Explanation:

The scanf function returns the number of input is given.

printf("%d\n", scanf("%d", &i)); 

The scanf function returns the value 1(one).

Therefore, the output of the program is '1'.

0 comments:

Post a Comment