You are not logged in.

#1 2015-09-12 06:32:06

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

C Language Pointer Output:

C Programming Quizzes C Language Pointer

Directions:
void main()
{
   int array[10];
   int *i = &array[2], *j = &array[5];
   int diff = j-i;
   printf("%d", diff);
}

Question:
Find the output of the following program.

Option A):
3
Option B):
Garbage value
Option C):
6
Option D):
85

Correct Answer is Option A):
3


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

2015-09-12 06:32:06

Advertisement
Ads By Google

Re: C Language Pointer Output:



Board footer