Dr Nick <3-> writes:
> Hans Vlems <> writes:
>> On 3 jul, 22:08, Joe Pfeiffer <pfeif...@cs.nmsu.edu> wrote:
>>> vinay kumar <vinay...@gmail.com> writes:
>>> > 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.
>>
>> 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).
>
> 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.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"