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]
((((a+i)+j)+k)+l)
*(*(*(*(a+i)+j)+k)+l)
(((a+i)+j)+k+l)
((a+i)+j+k+l)
Answer : B
View More Related Question
1) A pointer is
A keyword used to create variables
A variable that stores address of an instruction
A variable that stores address of other variable
All of the above
View Answer
2) Comment on the following C statement. const int *ptr;
You cannot change the value pointed by ptr
You cannot change the pointer ptr itself
You May or may not change the value pointed by ptr
You can change the pointer as well as the value pointed by it
View Answer
3) Which of the following does not initialize ptr to null (assuming variable declaration of a as int a=0;)?
4) What will be the output of the following C code? #include <stdio.h>
int x = 0;
void main()
{
int *const ptr = &x;
printf("%p\n", ptr);
ptr++;
printf("%p\n ", ptr);
}
5) What is (void*)0?