Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2025 Set 2
Questions

Q52

NAT2 marks

Consider the following C program:

#include<stdio.h>
int main(){
    int a;
    int arr[5] = {30,50,10};
    int *ptr;
    ptr = &arr[0] + 1;
    a = *ptr;
    (*ptr)++;
    ptr++;
    printf("%d", a + (*ptr) + arr[1]);
    return 0;
}

The output of the above program is _________. (Answer in integer)

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.