C Language MCQ - English
In which header file is the NULL macro defined?
Home | Discussion ForumIn which header file is the NULL macro defined?
Answer : C
View More Related Question
1) What will be the output of the program ? #include<stdio.h>
int main()
{
int i=3, *j, k;
j = &i;
printf("%d\n", i**j*i+*j);
return 0;
}
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 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;
}
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) Which of the following does not initialize ptr to null (assuming variable declaration of a as int a=0;)?