c program
-
how to write the c program to display ' Hello world ' without using semicolon ?
-
how to write the c program to display ' Hello world ' without using semicolon ?
-
how to write the c program to display ' Hello world ' without using semicolon ?
Does your question make sense? Am I missing something?
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
-
how to write the c program to display ' Hello world ' without using semicolon ?
# define SEMI ;
Or, on the command line:F:\Projects>type nosem.c
void main(void) { printf ( "Hello, world!" ) SEMI }
F:\Projects>cl.exe /nologo /FIstdio.h /DSEMI=; nosem.c
nosem.cF:\Projects>nosem
Hello, world!
F:\Projects>:badger:
-
how to write the c program to display ' Hello world ' without using semicolon ?
For MS VisualStudio, this should work: int main() { #pragma message ("Hello World!") } It will generate the message "Hello World at compile time, even if the ';' key is broken on your keyboard. see http://msdn.microsoft.com/en-us/library/x7dkzch2%28v=vs.100%29.aspx[^] On a sidenote, you can write C++ programs without the use of many central characters by using digraphs and trigraphs[^]. However, ';' is ot one of the characters you can circumscribe that way, and you can't express any command that will be executed at runtime without it.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)