You are not logged in.

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

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

C Language Pointer Output:

http://interviewquestionsanswers.org/quiz/C-Programming http://interviewquestionsanswers.org/qu … ge-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


Failure is the first step towards seccess.

2015-09-12 06:32:08

Advertisement
Ads By Google

Re: C Language Pointer Output:



Board footer