Download
the infamous hello world program n.
Skip this Video
Loading SlideShow in 5 Seconds..
The Infamous “Hello World” Program PowerPoint Presentation
Download Presentation
The Infamous “Hello World” Program

The Infamous “Hello World” Program

98 Vues Download Presentation
Télécharger la présentation

The Infamous “Hello World” Program

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. The Infamous “Hello World” Program The Infamous “Hello World” Program /* Block Comments */ // End-of-Line (new in C99) #include <stdio.h>  /* putc(), stdout */ int main(void) { putc('H', stdout); putc('e', stdout); putc('l', stdout); putc('l', stdout); putc('o', stdout); putc(' ', stdout); putc('W', stdout); putc('o', stdout); putc('r', stdout); putc('l', stdout); putc('d', stdout); putc('!', stdout); putc('\n', stdout); return 0; } <> for Standard Include Directory “” for Current Directory first Preprocessor Directive Function call (or invocation) Statements end with semicolons. Argument List – comma separated Character Constant 4228160 (Borland TurboC/C++ v4.5) Function Definition ‘H’ = 72 (if ASCII is used) Type – “void” if nothing returned Name – EXACTLY one main() Parameter List – “void” of none taken int putc(int c, FILE *stream); Body = One Compound Statement