K
kevin arnold
Hello everyone,
I chanced to hit upon a very weird piece of code snippet and i
cannot account for its
functioning. I tried gcc (even with -Wall option) and it worked fine.
So does CC (Solaris)
and aCC (HP-UX) without a warning. Now I can account for a, b, c - for
argc, argv and envp
but how to account for the other variables d and e? Are the compilers
at fault or I am missing
something? Thanks in advance for the help.
#include <stdio.h>
#include <stdlib.h>
int main (int a, int b, int c, int d, int e)
{
return (a + b + c + d +e);
}
Regards,
kevin.
I chanced to hit upon a very weird piece of code snippet and i
cannot account for its
functioning. I tried gcc (even with -Wall option) and it worked fine.
So does CC (Solaris)
and aCC (HP-UX) without a warning. Now I can account for a, b, c - for
argc, argv and envp
but how to account for the other variables d and e? Are the compilers
at fault or I am missing
something? Thanks in advance for the help.
#include <stdio.h>
#include <stdlib.h>
int main (int a, int b, int c, int d, int e)
{
return (a + b + c + d +e);
}
Regards,
kevin.