C Language MCQ - English
What would be the equivalent pointer expression for referring the array element
Home | Discussion ForumWhat would be the equivalent pointer expression for referring the array element a[i][j][k][l]
Answer : B
View More Related Question
1) Comment on the following pointer declaration. int *ptr, p;
View Answer
2) Can you combine the following two statements into one? char *p;
p = (char*) malloc(100);
View Answer
3) What will be the output of the following C code? #include <stdio.h>
int main()
{
int *ptr, a = 10;
ptr = &a;
*ptr += 1;
printf("%d,%d/n", *ptr, a);
}
4) What will be the output of the following C code? #include <stdio.h>
int main()
{
int i = 10;
void *p = &i;
printf("%f\n", *(float*)p);
return 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;
}