The line 
        main ()
declares "main" as a pointer to the function main() 
just as "array_name" is a pointer to the first element of the array 
array_name[] 
and is the same as &array_name[0] which means "address of first array element 
of array called array_name".

              From http://en.wikipedia.org/wiki/Main_function#C_and_C.2B.2B
              In C and C++, the function prototype of the main function is one 
of the following:

              int main(void);
              int main();
              int main(int argc, char *argv[]);

Therefore "main" is an int.and 
        printf("Main: %d", main); 
Will print the address of main. 

mcb






  ----- Original Message ----- 
  From: Manoj Vivek 
  To: [EMAIL PROTECTED] 
  Cc: [email protected] 
  Sent: Friday, October 31, 2008 11:48 AM
  Subject: Re: [c-prog] obveious


  what are you saying.. I can't understand.. ... Where is main declared... How 
can it be printed as a integer using %d..... You are saying it is declared if 
it is declared what is the data type...

  Brett McCoy wrote: 
  > On Fri, Oct 31, 2008 at 1:11 PM, Manoj Vivek < vivek_jonam@ yahoo.com > 
wrote: 
  >> it is Ok.. But why that error is not shown for main in first snippet 
  > Because main has been declared. 
  > -- Brett 
  > ------------ --------- --------- --------- --------- --------- - 
  > "In the rhythm of music a secret is hidden; 
  > If I were to divulge it, it would overturn the world." 
  > -- Jelaleddin Rumi 
  > 



   

[Non-text portions of this message have been removed]

Reply via email to