What is the difference between null pointer and the void
pointer?
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
NULL POINTER:
this pointer returns null value to the main function......
it cant be type casted.........
VOID POINTER:
this pointer has a special advantages that it can point
to any value (int , char, float etc) when its type casted
for eg:
main()
{
char *p;
int n;
(int *)p=&n;
so on the above character pointer is been type casted to
point an integer value n;
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / sunitha
null pointer : used to compair a pointer to any object or
a function and returns a null value to the main function.
void pointer : void pointer ia pointer which does not have
any return type and it can be easily type casted with other
type of pointers.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vaibhav
null pointer contain null value . it doesn't contain any
value.
while void pointer is a pointer that cascade at a runtime.
i.e it casting at runtime
| Is This Answer Correct ? | 3 Yes | 3 No |
Do pointers need to be initialized?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
Explain what is the benefit of using an enum rather than a #define constant?
Explain how do you override a defined macro?
a 'c' program to tell that the set of three coordinates lie on a same line
list the no of files created when c source file is compiled
What are the types of variables in c?
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
Table of Sudoku n*n
i want to have a program to read a string and print the frequency of each character and it should work in turbo c
Tell me what are bitwise shift operators?
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..???