Wednesday, February 25, 2015

What is a null pointer?

Question:What is a null pointer??

Answer: </I>There are times when it's necessary to have a pointer that doesn't point to anything. The macro NULL, defined in &lt;stddef.h&gt;, 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. &nbsp;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 &nbsp;

Tags:Interview Questions, Languages, C,

Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.



Sponsor Advertisement



Hospital Management Software

Hotel Management System Software

Hotel Management System software is a web based system help to manage reservations, roomstays, bookings, guests, folios, invoices and billing etc. The software features include revenue management, booking calendar, guest relationship management, check-in & check-out, invoices and receipts etc...

No comments:

Post a Comment