1.What is diffrence Between NULL and '/0' characters?
2.Does the last cell os a string has NULL or '/0'?
hsetaknev 0 Newbie Poster
Recommended Answers
Jump to PostNULL is a macro defined in <stddef.h> for the null pointer.
Its not '/0' its '\0'
'\0' is defined to be a null character, a character with all bits set to zero.Used as end of string.
Jump to Post>The exact definition of NULL is compiler dependent, but normally defined as either (char *)0 or just 0.
I haven't seen NULL defined as(char*)0
and I don't suspect any compilers have done so after the generic pointer type was introduced to C. While char* and void* have the …
All 8 Replies
seanbp 4 Junior Poster
Shankye 36 Junior Poster
hsetaknev 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Shankye 36 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
hsetaknev 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.