You are not logged in.

#1 2015-09-15 04:10:14

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

C Language Control Structures Program:

C Programming Quizzes C Language Control Structures

Directions:
What will be the output of the given program?

Question:
#include<stdio.h>
void main()
{
      int  i=10;
      printf("i=%d", i);
      {
            int  i=20;
        printf("i=%d", i);
        i++;
        printf("i=%d", i);
      }
      printf("i=%d", i);
}

Option A):
10 20 21 10
Option B):
10 10 11 11
Option C):
10 20 21 21
Option D):
10 20 21 20

Correct Answer is Option A):
10 20 21 10


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

2015-09-15 04:10:14

Advertisement
Ads By Google

Re: C Language Control Structures Program:



\n

Board footer