Consider the following C program:
The output of the above program is ________. (Answer in integer)
c
Programming in CPointers, Multi-Dimensional Arrays, StructuresNAT2 marksMedium
1#include <stdio.h>
2int main( ) {
3 int a;
4 int arr[5] = {30, 50, 10};
5 int *ptr;
6 ptr = &arr[0] + 1;
7 a = *ptr;
8 (*ptr)++;
9 ptr++;
10 printf("%d", a + (*ptr) + arr[1]);
11 return 0;
12}
13A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.