C Language MCQ - English
How many bytes are occupied by near, far and huge pointers (DOS)?
near=2 far=4 huge=4
near=4 far=8 huge=8
near=2 far=4 huge=8
near=4 far=4 huge=8
Answer : A
View More Related Question
1) 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;
}
2) 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);
}
3) 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
4) 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?
5) 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