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

Tiên Hương

New member
What will be the output of the following C code?
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
 

Tìm kiếm

Back
Top