Sail E0 Webinar
Question

What will be output of following program?




#include<stdio.h>
#include<string.h>
int main()
{
int a = 5, b = 10, c;
int *p = &a,*q = &b;
c = p - q;
printf("%d",c);
return 0;
}


Options:
A .  1
B .  5
C .  -5
D .  Compilation error
E .  None of the above
Answer: Option A

Difference of two same type of pointer is always one




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers