Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
Pointers
In which header file is the NULL macro defined?
stdio.h
stddef.h
stdio.h and stddef.h
math.h
Correct Answer:
stdio.h and stddef.h
Explanation:
The macro "NULL" is defined in locale.h, stddef.h, stdio.h, stdlib.h, string.h, time.h, and wchar.h.
← Previous Question
Next Question→
More Questions from
Pointers
What is (void*)0?
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?
Can you combine the following two statements into one? char *p; p = (char*) malloc(100);
A pointer is
How many bytes are occupied by near, far and huge pointers (DOS)?
What would be the equivalent pointer expression for referring the array element a[i][j][k][l]
What will be the output of the program? #include
int main() { char *str; str = "%d\n"; str++; str++; printf(str-2, 300); return 0; }
What will be the output of the program? #include
int main() { char *str; str = "%s"; printf(str, "K\n"); return 0; }
What will be the output of the program? #include
int main() { char str1[] = "India"; char str2[] = "CURIOUSTAB"; char *s1 = str1, *s2=str2; while(*s1++ = *s2++) printf("%s", str1); printf("\n"); return 0; }
What will be the output of the program assuming that the array begins at the location 1002 and size of an integer is 4 bytes? #include
int main() { int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; printf("%u, %u, %u\n", a[0]+1, *(a[0]+1), *(*(a+0)+1)); return 0; }
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments