You are not logged in.

#1 2015-09-14 06:11:24

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

C Language Function Program Code:

C Programming Quizzes C Language Function

Directions:
What will be the output of the following program code?

Question:
main()
{
      static int var = 5;
      printf("%d ", var--);
      if(var)
            main();
}

Option A):
Infinite Loop
Option B):
5 4 3 2 1
Option C):
Compilation Error
Option D):
5 5 5 5 5

Correct Answer is Option B):
5 4 3 2 1


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-14 06:11:24

Advertisement
Ads By Google

Re: C Language Function Program Code:



\n

Board footer