>>for(;0;)
>>printf("hello ");
>>>
>>even the condition s wrong i get a hello printed on the screen
>>y s this happening
>>
>Y h n p e c.
>
"You have not posted entire code."?
Not what I had in mind, although you did get the first three words right.
As you have demonstrated, the more letters that are gratuitously omitted
from the words of an article, the harder it is to decide what the author
meant.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
#include <stdio.h>
>
int main(void)
{
for(;0;)
printf("hello") ;
>
return 0;
}
>
I tried it on 4 different compilers and none of them printed hello on
the screen. One of them warned about unreachable code.
Lookup how a "for" loop works and all will become clear.
HINT: The conditional to be tested in the above snippet is always false.
for(;0;)
printf("hello") ;
>
even the condition s wrong i get a hello printed on the screen
y s this happening
Your compiler is broken? You are not using C compiler but some
compiler for a /type-name-here/ language which was developed 666 hours
ago by a crazy programmer who wants to take over the World? You have
put ';' after ')' and haven't noticed it?
BTW. SAA#1.
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl >--<jid:mina86*jab ber.org>--ooO--(_)--Ooo--
Comment