Consider the following C program carefully. What will be printed on the screen when this program is compiled and executed?
#include <stdio.h>
int main() {
int arr[] = {5, 10, 15, 20, 25};
int *p = arr + 1;
p = p + 2;
printf("%d %d", *p, *(p - 1) + arr[4]);
return 0;
}20 40
15 40
10 30
20 45
The verified answer and full solution are one login away
Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.
Log in to see the answerMore c output questions