Examveda

What will be the output of the following C code?
#include <stddef.h>
int main(void)
{
    int num[10];
    int *p1=&num[14], *p2=&num[19];
    ptrdiff_t a = p1-p2;
    printf("%d", a);
}

A. 5

B. -5

C. error

D. 10

Answer: Option B


This Question Belongs to C Program >> Standard Library Functions

Join The Discussion

Related Questions on Standard Library Functions