C Language MCQ - English
If a variable is a pointer to a structure, then which of the following operator
Home | Discussion ForumIf a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?
Answer : D
View More Related Question
1) What would be the equivalent pointer expression for referring the array element a[i][j][k][l]
2) What will be the output of the program ? #include<stdio.h>
int main()
{
int x=30, *y, *z;
y=&x; /* Assume address of x is 500 and integer is 4 byte size */
z=y;
*y++=*z++;
x++;
printf("x=%d, y=%d, z=%d\n", x, y, z);
return 0;
}
3) If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?
4) Which of the following does not initialize ptr to null (assuming variable declaration of a as int a=0;)?
5) What will be the output of the program ? #include<stdio.h>
int main()
{
static char *s[] = {"black", "white", "pink", "violet"};
char **ptr[] = {s+3, s+2, s+1, s}, ***p;
p = ptr;
++p;
printf("%s", **p+1);
return 0;
}