Examveda
Examveda

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

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

A. 10

B. 9

C. 11

D. None of these.

Answer: Option B

Solution(By Examveda Team)

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


This Question Belongs to C Program >> Function

Join The Discussion

Comments ( 5 )

  1. Star Illyaas
    Star Illyaas :
    4 years ago

    hi how its works please tell

  2. Kasuni Jayasekara
    Kasuni Jayasekara :
    4 years ago

    I also think it will print 10

  3. Kameswari Karamchety
    Kameswari Karamchety :
    5 years ago

    i am aslo think it will print 10.

  4. Sri Harika
    Sri Harika :
    6 years ago

    if it returns 10 according to the explanation why is it 9!!!

  5. Prashant Kumar
    Prashant Kumar :
    7 years ago

    i thick it will print 10

Related Questions on Function