You are not logged in.

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

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
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


Failure is the first step towards seccess.

2015-09-15 04:10:16

Advertisement
Ads By Google

Re: C Language Control Structures Program:



\n

Board footer