in Technology by
What is the difference between an uninitialized pointer and a null pointer?

1 Answer

0 votes
by

An uninitialized pointer is a pointer that points unknown memory location. The behavior of the uninitialized pointer is undefined. If you try to dereference the uninitialized pointer code behavior will undefine.

According to C standard, an integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant. The behavior of the uninitialized pointer is defined. When you try to dereference the null pointer then your code will crash.

Related questions

0 votes
    What is the difference between pointer to an array and array of pointers?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is the usage of the NULL pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
+1 vote
    What is NULL Pointer in C Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
+1 vote
    What are the ways to a null pointer that can be used in the C programming language?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    According to ISO C++, dereferencing a null pointer is undefined behaviour. My curiosity is, why? Why ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    What is (void*)0? Error re of null pointer re of void pointer none of the listed options? Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    What is the difference between null=True and blank=True in Django?...
asked Feb 1, 2021 in Technology by JackTerrance
0 votes
    Write two points difference between Null loop and infinite loop Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
0 votes
    Differentiate between a constant pointer and pointer to a constant?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    What does it mean when a pointer is used in an if statement?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    I came across this code today AsyncInvoke(OnTimeMessageTimer, (object)null, (ElapsedEventArgs)null); Is there ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    You can check to see whether an R object is NULL with the _________ function. (a) is.null() (b) is. ... and Debugging of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Which of these exceptions will be thrown if we use null reference for an arithmetic operation? (a) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause. A special ... Schemes topic in chapter Concurrency Control of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
...