0
What is the output of the following C program?
#include <stdio.h>
int main() {
int a[5] = {10, 20, 30, 40, 50};
int *p = &a[4], *q = &a[1];
printf("%d", (int)(p - q));
return 0;
}- A12
- B3
- C1
- D4
Correct answer: B
What is the output of the following C program?
#include <stdio.h>
int main() {
int a[5] = {10, 20, 30, 40, 50};
int *p = &a[4], *q = &a[1];
printf("%d", (int)(p - q));
return 0;
}