You are not logged in.

#1 2015-09-12 06:55:56

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

Turbo C Code:

C Programming Quizzes C Language Pointer

Directions:
#include<stdioh>
void main()
{
   int a[]={ 1, 2, 3, 4, 5 }, *p;
   p=a;
   ++*p;
   printf("%d ", *p);
   p += 2;
   printf("%d", *p);
}

Question:
What would be the output for the following Turbo C code?

Option A):
2 2
Option B):
2 4
Option C):
2 3
Option D):
3 3

Correct Answer is Option C):
2 3


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

2015-09-12 06:55:56

Advertisement
Ads By Google

Re: Turbo C Code:



Board footer