ya Amit is right...
sizeof(main()) will return 4 because main will return an integer.....however 
it will not execute main()..and sizeof(&main) will give 4 too but this time 
it is 4 because &main is a pointer to main

another example


#include<stdio.h>
#include<conio.h>
double foo();
main()
{
      int a,b,c;
      int **p;
      printf("%d",sizeof(foo()));
      getch();
      }
double foo()
{
       printf("Hi");
       return 123.45;
       }


Here sizeof(foo())will return 8 which is the size of double. However it will 
not run the function foo.....and sizeof(&foo) gives 4 ...as it is a pointer 
to function foo

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/IP5eG_wpP7oJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to