Is it possible to print---- hello world on the screen without using semicolon( ; ) anywhere in the code...i was able to do it through MACROS..but is there anyother way??

Recommended Answers

MACROS? What does this acronym stand for?

Use an empty while loop.

Jump to Post

[Oooooh, when will these questions cease to poison new programmers...?]

Yes. Hone your Googling skills if you are out of hints. [Bonus: Google the groups. Don't make me mention comp.lang.c (ooops!).]

Jump to Post

All 6 Replies

MACROS? What does this acronym stand for?

Use an empty while loop.

[Oooooh, when will these questions cease to poison new programmers...?]

Yes. Hone your Googling skills if you are out of hints. [Bonus: Google the groups. Don't make me mention comp.lang.c (ooops!).]

Use a different programming language :)

Use a different programming language :)

Nice Answer :lol:

Use an empty while loop.

empty while loop did worked but stuck into infinite loop

while(cout<<"Hello World")
{
}

Try

#include <iostream>

int main(){
        while((std::cout << "Hello World"<< std::endl) == 0){}

}

I would assume that like most things cout would return a +ive int if it has success :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.