ExamVeda
Login
Home
This question belongs to C Program Function
Function
?

Determine output:
main()
{
      int i = abc(10);
      printf("%d", --i);
}

int abc(int i)
{
      return(i++);
}

Answer & Solution
Correct Answer: Option B

return(i++) it will first return i and then increment. i.e. 10 will be returned.

Examveda
Question posted by Examveda
Community

Join the Discussion

5 Comments
Star Illyaas
Star Illyaas 6 years ago
hi how its works please tell
Kasuni Jayasekara
Kasuni Jayasekara 6 years ago
I also think it will print 10
Kameswari Karamchety
Kameswari Karamchety 7 years ago
i am aslo think it will print 10.
Sri Harika
Sri Harika 8 years ago
if it returns 10 according to the explanation why is it 9!!!
Prashant Kumar
Prashant Kumar 10 years ago
i thick it will print 10