Hi everbody,My below program is running successfully ,but at end it is displaying Null Pointer Assignment as output. Why ???

#include #include int main(){     
  float far **ptr; /* For 2-D array dynamic allocation*/   
             register int i,j;           
     ptr=(float far**)calloc(256,sizeof(ptr));
                if(ptr==NULL)               {     
     printf("\n No Memory! ");     
      return 0;       }        
           for(i=0;i

Hi everbody,My below program is running successfully ,but at end it is displaying Null Pointer Assignment as output. Why ???

#include #include int main(){ float far **ptr; /* For 2-D array dynamic allocation*/ register int i,j; ptr=(float far**)calloc(256,sizeof(ptr)); if(ptr==NULL) { printf("\n No Memory! "); return 0; } for(i=0;i

Put your code inside code tags. Read post no 7 in http://www.daniweb.com/techtalkforums/thread54763.html"]this thread.

commented: Spreading some reputation back (Anonymusius) :P +1

dsraju, there's no such thing as far in ANSI C. I guess you are still using ancient compilers. It's time to move ahead.