*#include<stdio.h>*
*
*
*
*
*struct emp*
*{*
*char name[20];*
*int age;*
*};*
*f(struct emp ee)*
*{*
*printf("%s ...%d\n",ee.name,ee.age);*
*}*
*main()*
*{*
*struct emp e={"qwe",12};*
*f(e);*
*}*This above code works fine on gcc 4.3.2 output : qwe ...12 On Sun, Jul 31, 2011 at 8:38 PM, Anika Jain <[email protected]> wrote: > In C default return type is int and as you havent given return type for f > function compiler assumes it as int but u r not returning any integer from > that function > > On Sun, Jul 31, 2011 at 8:33 PM, Rajesh Kumar <[email protected]>wrote: > >> What is Error in This program??plzrply >> #include<stdio.h> >> f(struct epm); >> struct emp >> { >> char name[20]; >> int age; >> }; >> main() >> { >> struct emp e={"qwe",12}; >> f(e); >> } >> f(struct emp ee) >> { >> printf("%s ...%d\n",ee.name,ee.age); >> } >> >> >> -- >> Rajesh Kumar >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards Rajeev N B <http://www.opensourcemania.co.cc> "*Winners Don't do Different things , they do things Differently"* -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
