what is diference between return 0 and return NULL??

Answers were Sorted based on User's Feedback



what is diference between return 0 and return NULL??..

Answer / sourabh

return 0 means the function returns the particular value 0
returnn null means the function does not return any value'

Is This Answer Correct ?    5 Yes 1 No

what is diference between return 0 and return NULL??..

Answer / dips

return 0 is indicatiion of successsfull completetion of
programme generally we write return 0 for that purpose
return null its returnig nothing in some condition we may
dont require to return any value

Is This Answer Correct ?    3 Yes 2 No

what is diference between return 0 and return NULL??..

Answer / bajishareef

o is the value oriented decimal constant which is of integer type.
Where as NULL is the address oriented empty value.
Both are not equal

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More C Interview Questions

What is main () in c?

0 Answers  


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

0 Answers   Wilco,


please give code for this 1 2 4 7 11 16

11 Answers   Intel, Wipro,


How arrays can be passed to a user defined function

0 Answers  


wat is the difference between a definition and declaration? float y;---it looks like a declaration..but it s a definition.how?someone explain

3 Answers   TCS,


array of pointer pointer to array pointer to pointer

1 Answers   MAHINDRA,


Why is c used in embedded systems?

0 Answers  


What is ambagious result in C? explain with an example.

0 Answers   Infosys,


What is the difference between i++ and i+1 ?(in terms of memory)

3 Answers   HCL,


What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation

10 Answers   IBM,


What are the key features in c programming language?

0 Answers  


/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*

6 Answers  


Categories