Solve This (? + ? + ?=30)
If 1111=R, 2222=T, 3333=E, 4444=N Then 5555=?
Guess the Hindi Muhawara from the following whatsapp Emoticons?
Sweet, Medicine, Film, Girl, City, Car, Place, Doggy all are name same, guess which word it is?
Guess me who am I, I am the first on earth, the second in heaven...
Four Question, One Answer: One River Name, One Flower Name, One Film Name, One Actress Name?
A girl is blind, deaf, dumb and uneducated too. A boy loves her. How would he propose without touching her?
Which Indian cricketer is known as "Brown Bradman"?
Which of the countries has had a prime minister whose name featured the name of his country?
Describe the 5 tests to Identify if diamond is Genuine?
A NULL pointer assignment is a runtime error.
It occurs due to various reasons:--
one is that ur program has tried to access an illegal memory location. Illegal location means either the location is in the operating systems address space or in the other processes memory space. In stdio.h NULL is defined as 0 So whenever your program tries to access 0th location the operating system kills your program with runtime assignment error because the 0th location is in the operating systems address space and operating system doesnt allow access to its address space by user program .
int* ptr = NULL;
*ptr = 3;
There are many scenarios where you can see problems. But the key thing is, you did not allocate the memory for the pointer and you are trying to use the pointer.
See the following two statement
float *ptr = malloc( sizeof(*ptr) );
ptr = malloc( sizeof(*ptr) );
In first case we allocate the memory to *ptr and in the second to ptr, why is such a difference.
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
Forgot Your Password?
2018 © Queryhome