×

C Tutorial

C Basics

C Data Types

C Input/Output

C Operators

C Conditional Statements

C Control Statements

C Strings

C Functions

C Arrays

C Structure and Unions

C Pointers

C Preprocessor Directives

C Command-line Arguments

C File Handlings

C Graphics

C Advance Topics

C Tips and Tricks

C Important Topics

C Practice

What is NULL pointer and how it is defined?

C language frequently asked question on string declaration: What is NULL pointer and how it is defined?
Submitted by IncludeHelp, on December 20, 2017

What is NULL pointer and how it is defined?

NULL is a preprocessor Macro, which is defined as null pointer constant, it can be defined in several files like stdio.h, stddef.h. The value of NULL is 0 (Zero) or ((void*) 0).

Initializing a variable by NULL is a stylistic convention only, and it turns back into 0 through preprocessor.

It is programmer's choice, whether he/she wants to initialize an object (variable or whatever) with NULL or 0 (both are same).




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.