Should i employ null or 0?, C/C++ Programming

A: In C++, the definition of NULL is 0, thus there is only an aesthetic difference. I prefer to ignore macros, so I employ 0. Another difficulty with NULL is that people sometimes wrongly believe that it is different from 0 and/or not an integer. In pre-standard code, NULL was/is sometimes described to something unsuitable and thus had/has to be ignored. That's less common these days.

 

Posted Date: 3/20/2013 8:16:39 AM | Location : United States







Related Discussions:- Should i employ null or 0?, Assignment Help, Ask Question on Should i employ null or 0?, Get Answer, Expert's Help, Should i employ null or 0? Discussions

Write discussion on Should i employ null or 0?
Your posts are moderated
Related Questions
List any six commonly found programming errors in a C program Six commonly found errors in a C program are: 1.  Missing or misplaced  ; or  }, missing return type for a proc

Can I free() pointers allocated  along with new? Can I delete pointers allocated along with malloc()? A: No. It is completely legal, moral, and wholesome to employ malloc() a

check this link: http://cactus.eas.asu.edu/partha/Teaching/430.2013/Project/proj-2.2013.htm

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

write a function that take as parameters an array of integer and its size and return the sum of its value

write a pseudo code for computing sin(x) using sentinel control loop

Pointer to function: int mul(int a, int b, int c) {   return a*b*c; } void main() {   int (*function_pointer)(int, int, int);   function_pointer = &mul;

Program is to store first n natural no in a file: Write a program to  store first n natural no in a file void main()     {     fstream file;     file.open("studen

Write a simple telephone book program that stores the names and phone numbers of your friends/acquaintances in a file. Your program should have the abilities to: a. Add entries (na

C Program for MAXIMUM NO, MINIMUM NO AND SORTING   void main() {           int i,j,t;           int a[5];           clrscr();           for(i=0;i