Gate CS-2017-2 Question Paper With Solutions

Q. 53 Consider the following program

#include<stdio.h>
#include<string.h>

int main()
{
    char * c = "GATECSIT2017";
    char *p = c;
    printf("%d", (int)strlen(c+2[p]-6[p]-1));
    return 0;
}

The Output of the following program is____

Note: This question appeared as Numerical Answer Type.

(A) 1

(B) 2

(C) 4

(D) 6

Answer: (B)

Explanation:

Gate CS-2017-2 Question Paper With Solutions

Learn More:   Gate ME 2015-3 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here