Gate CS-2019 Question Paper With Solutions

Q. 33 Consider the following C program:

#include<stdio.h>   int main(){    int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip = arr + 4;      printf("%d\n", ip[1]);      return 0;  } 

The number that will be displayed on execution of the program is _________ .

(A) 6

(B) 5

(C) 4

(D) segmentation error

Answer: (A)

Explanation:

Gate CS-2019 Question Paper With Solutions Gate CS-2019 Question Paper With Solutions

Learn More:   Gate CS-2014-3 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here