answersLogoWhite

0


Best Answer

It means your computer has crashed and is caused by current microprocessor technology being in the early stages of development. Current experts expect this problem to disappear in about 10 - 25 years. Seriously many tens of thousands of things could have caused the problem in the first place - a single cause would be impossible to determine.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

Null pointer assignment is a runtime error. It most often occurs when you attempt to assign a value to the NULL address (hence the name of the error) but it can also occur whenever you attempt to assign a value to an address that does not belong to your process. For example:

void f (int* p) {

*p = 42;

// ...

}

The above function is unsafe because it assumes ptr always refers to a valid address. As a result, the following will cause a null pointer assignment error:

f (NULL); // error!

Or, more subtly:

void g (int* p) {

f (p); // p could be valid, but it could also be NULL or even uninitialised!

// ...

}

To avoid null pointer assignments, always initialise your pointers with a valid address. If you have no suitable address to initialise with, initialise with the NULL address:

int* ptr = NULL;

Every time your code changes the address assigned to a pointer, the onus is upon your code to ensure the validity of that address. If done consistently, any code that assigns through a potentially NULL address can use a simple assertion:

void f (int* p) {

assert (p != NULL);

*p = 42;

// ...

}

In this way you can catch and eliminate null pointer assignments in debug builds (when NDEBUG is not defined) without paying the cost of runtime testing in release builds (when NDEBUG is defined).

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Null pointer assignment means assigning a value to 0th location or accessing 0th location which is run time error should be avoided.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

It means that you haven't initialized the pointer or the object it points does not exist any more or not accessible.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does the error NULL Pointer Assignment means and what causes this error?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is null pointer assignment?

This error message means that somewhere in your program you have used a pointer-varible containing NULL-value. (Within an actual OS it with stop the program immediately, but in MS-DOS it doesn't.)


Difference between pointer to constant and constant pointer?

1. pointer to a constant means you can not change what the pointer points to 2. constant pointer means you can not change the pointer.


What does the error 'Null Pointer Assignment' mean?

The null pointer assignment error means your program has attempted to access a memory address that does not belong to your program. This typically occurs when accessing memory indirectly through a pointer: int* p = nullptr; *p = 42; // Error: null pointer assignment The above is the classic example of this type of error. The null address is typically the all-zeroes address (0x0) but, regardless of the physical address, it must never be accessed because it is a system address. We typically refer pointers to the null address when they are no longer in use or we don't have an address we can (yet) assign to them. Passing unchecked pointers to functions is another common cause: void f (int* p) { *p = 42; // potential error // ... } In the above example there's no guarantee p refers to a non-system address. Although we can easily test p is non-null before accessing it, that won't guarantee p refers to a non-system address. However, we can greatly reduce the risk of error by passing memory address via references instead of pointers: void f (int& r) { r = 42; // ... } There's still potential that r refers to a system address if the address were passed via a pointer, however there is seldom any need to use unchecked pointer variables in C++. References and resource handles (or smart pointers) eliminate the need for pointers and are actually more efficient than pointers because testing for null becomes largely redundant. The only time we really need a pointer is when "no object" is a valid argument: void f (int* p) { if (p == nullptr) { // the "no object" code } else { // code that operates on an object } }


What does WIMP means?

It means window,interface,menu,pointer


What is dynamic assignment?

Dynamic IP assignment means that your IP address can change.


What causes error code P0400 on 2000 Suzuki Vitara?

Trouble code P0400 means: EGR System Performance


What does pointer to pointer finger mean?

yea that's why its called the point FINGER


Which finger represents being gay?

if you have it on your pointer finger it means gay if you are married if you aren"t married having a ring on your pointer finger means nothing.


Why void is used in c language?

void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer


What is the pointer used in bar mitzvah called?

Clarification is needed. The pointer used isn't specific to the Bar Mitzvah ceremony, it is the pointer used whenever the Torah scroll is read. The pointer itself is called a 'yad' which means 'hand'.


What causes error code p1470 on BMW 740IL?

Trouble code P1470 means: Leakage Diagnostic Pump Control Circuit Electrical


What is an Ouija pointer called?

Planchette, it means "little plank".