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 |
2.Given the short c program that follows a. make a list of the memory variables in this program b.which lines of code contain operations that change the contents of memory? what are those operations? Void main( void) { Double base; Double height; Double area; Printf(“enter base and height of triangle :”); Scanf(“%lg”, &base); Scanf(“%lg”, &height); Area=base*height/2.0; Printf(“the area of the triangle is %g \n”,area); }
Explain what are the different data types in c?
what is compiler
Write a program to find factorial of a number using recursive function.
What is that continue statement??
how to find out the reverse number of a digit if it is input through the keyboard?
Give me the code of in-order recursive and non-recursive.
how many header file is in C language ?
44 Answers College School Exams Tests, CTS, IBM, IMS, Infosys, ME, Sign Solutions, Wipro, XVT,
What is the use of void pointer and null pointer in c language?
difference between the array and linked list general difference related to memory
4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it. i have done maximum par but i m findind problem in the commented area. please help...
write a function that accepts an array A with n elements and array B with n-1 elements. Find the missing one in array B,with an optimized manner?