V
vinay kumar
main()
{
int d=010;
printf("%d",d);
}
{
int d=010;
printf("%d",d);
}
vinay kumar said:main()
{
int d=010;
printf("%d",d);
}
main()
{
int d=010;
printf("%d",d);
}
vinay kumar said:main()
{
int d=010;
printf("%d",d);
}
I don't want to be too rude, but you could compile and run it and find
the output for yourself much faster than you can expect an answer here.
Hans Vlems said:My guess is that the OP did do that. And it failed to compile because
printf
wasn't defined. If the OP had managed to find the answer to that in
his textbook then the
question would never have arrived here.
I seriously doubt the OP is interested in niceties as main() vs.
main(void) or int main(void).
Hans Vlems said:My guess is that the OP did do that. And it failed to compile because
printf
wasn't defined. If the OP had managed to find the answer to that in
his textbook then the
question would never have arrived here.
I seriously doubt the OP is interested in niceties as main() vs.
main(void) or int main(void).
Hans
Dr Nick said:My guess is he didn't. My guess is it's our resident troll again.
Let's count shall we:
no #includes
no type for main
no void
no trailing newline on printf
no return from main
5 out of 5.
That's ignoring the actual problem of course.
My guess is that it's simply old code. IIRC, 4 out of 5 of the
things you count are characteristics of the "hello world" program
in K&R1.
How about:
no follow-up response.
That's generally a pretty good indicator of our resident troll.
Chad said:So like, I got rejected by UCLA three times in a row and UC Berkeley
like 4 times in a row. Actually, now that I think about it, the people
in the Computer Science Department at UCLA didn't even want to talk to
me this last time around.
So like, I got rejected by UCLA three times in a row and UC Berkeley
like 4 times in a row. Actually, now that I think about it, the people
in the Computer Science Department at UCLA didn't even want to talk to
me this last time around.
How about:
no follow-up response.
Willem said:Hans Vlems wrote:
) I seriously doubt the OP is interested in niceties as main() vs.
) main(void) or int main(void).
That is just a stick to hit people with when they post homework questions.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.