Computer Sciences > Gate 2022 > Pointer
What is printed by the following ANSI C program?

#include<stdio.h>
int main(int argc, char *argv[])
{
    int x = 1, z[2] = {10, 11};
    int *p = NULL;
    p = &x;
    *p = 10;
    p = &z[1];
    *(&z[0] + 1) += 3;
    printf("%d, %d, %d ", x, z[0], z[1]);
    return 0;
}
A
1,10,11
B
1,10,14
C
10,14,11
D
10,10,14

Correct : d

Similar Questions

Consider the C code fragment given below. typedef struct node { &nbsp; &nbsp; int data; &nbsp; &nbsp; node* next ; } node; void join(node* m, node* n) { &nbsp;...
#201 MCQ
Consider the C code fragment given below. typedef struct node { &nbsp; &nbsp; int data; &nbsp; &nbsp; node* next ; } node; void join(node* m, node* n) { &nbsp;...
#202 MCQ
Consider the following C code: #include&lt;stdio.h&gt; int * assignval (int *x, int val) { &nbsp; &nbsp; *x = val; &nbsp; &nbsp; return x; } int main()...
#204 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......