C Language MCQ - English
What is (void*)0?
Home | Discussion ForumWhat is (void*)0?
Answer : A
View More Related Question
1) 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;
}
2) Comment on the following pointer declaration. int *ptr, p;
View Answer
3) 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);
}
4) What will be the output of the following C code?#include <stdio.h>
int main()
{
char *p = NULL;
char *q = 0;
if (p)
printf(" p ");
else
printf("nullp");
if (q)
printf("q\n");
else
printf(" nullq\n");
}
View Answer
5) 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);
}