What is the output of the following C program? #include <stdio.h> int main() {…
GATE · 2024 · CS · Set 2 · Computer Science & IT
What is the output of the following C program?
#include <stdio.h>
int main() {
double a[2]={20.0, 25.0}, *p, *q;
p = a; q = p + 1;
printf(”%d,%d”, (int)(q – p), (int)(*q – *p));
return 0;
}
- A.
4,8
- B.
1,5
- C.
8,5
- D.
1,8
Attempted by 320 students.
Sign up free to check your answer
Sign up freeLoading lesson…