tag:blogger.com,1999:blog-959939550345671470.post1499119451172029911..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: NULL pointer in c programmingPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-959939550345671470.post-61603202487132786902014-06-04T08:52:36.792+05:302014-06-04T08:52:36.792+05:30the example 2 is int *ptr=(char *)0;however i thin...the example 2 is int *ptr=(char *)0;<br>however i think it should be int *ptr=(int *)0;<br>if it is not can anyone explian ?Satish Pawarhttps://www.blogger.com/profile/01902087524498807723noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-54977597245263347312014-06-04T08:49:27.398+05:302014-06-04T08:49:27.398+05:30This comment has been removed by the author.This comment has been removed by the author.Satish Pawarhttps://www.blogger.com/profile/01902087524498807723noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-12847939157170400402011-07-26T11:15:57.745+05:302011-07-26T11:15:57.745+05:30@Richa,add #include ... where NULL is defined...u ...@Richa,<br>add #include ... where NULL is defined...<br>u ll not get any error.... :)<br><br>Output: NULL means u cant copy into NULL pointer....<br>u r copying string into null pointer....<br>when u ll print tht pointer u ill get NULL as output....<br><br>:)Pradeephttps://www.blogger.com/profile/11772012342091398263noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-26962621880357792822011-07-26T11:13:45.415+05:302011-07-26T11:13:45.415+05:30This comment has been removed by the author.This comment has been removed by the author.Pradeephttps://www.blogger.com/profile/11772012342091398263noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-34014375327568936362011-06-23T20:19:06.173+05:302011-06-23T20:19:06.173+05:30in the last example could u pls explain wat actual...in the last example could u pls explain wat actually is the meaning f output (null) ... wen i executed dis code i am getting segmentation fault.Richahttps://www.blogger.com/profile/09783279586506201849noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-8409438706640155052011-03-29T07:01:17.763+05:302011-03-29T07:01:17.763+05:30the printf command is outside the loop so out put ...the printf command is outside the loop <br>so out put 3 has no problemgolam kibriahttps://www.blogger.com/profile/09616580292593984507noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-30975898700816283482011-02-06T00:21:19.638+05:302011-02-06T00:21:19.638+05:30#include "stdio.h"void main(){int i;stat...#include "stdio.h"<br><br>void main(){<br><br>int i;<br><br>static int count;<br><br>for(i=NULL;i<=5;){<br><br>count++;<br><br>i+=2;<br><br>}<br><br>printf("%d",count);<br><br><br>}<br><br><br>Output: 3<br><br><br><br><br>i want its explanation.................<br><br>please......................SOHANhttps://www.blogger.com/profile/15735511703470618235noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-28857349120035238072010-03-18T00:14:46.225+05:302010-03-18T00:14:46.225+05:30MEANING OF #define NULL 5 #define NULLMEANING OF <br> #define NULL 5<br> #define NULLakashhttps://www.blogger.com/profile/11170864559521889140noreply@blogger.com