Developer community
0 votes
61 views
asked by Geek (15.3k points) 17 43 67 | 61 views

2 Answers

0 votes
Null pointer is a pointer which points to nothing but uninitialized pointer may point to anywhere.
answered by Guru (27.1k points) 34 52 102
0 votes
There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in , has a value that’s guaranteed to be different from any valid pointer. NULL is a literal zero, possibly cast to void* or char*. Some people, notably C++ programmers, prefer to use 0 rather than NULL.
The null pointer is used in three ways:
1) To stop indirection in a recursive data structure
2) As an error value
3) As a sentinel value
answered by Expert (11.4k points) 14 23 30

Related questions

+1 vote
1 answer
asked by carlton Sr Member (4k points) 5 11 21 | 4.4k views
0 votes
1 answer
0 votes
1 answer
asked by smith Geek (15.3k points) 17 43 67 | 36 views
0 votes
2 answers
asked by allison Sr Member (1.5k points) 11 27 41 | 213 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

3,754 questions
4,046 answers
117 comments
10,709 users