1 / 6

Computer Programming 0455-3391-01

Computer Programming 0455-3391-01. A simple example. /* HelloWorld: A simple C program */ #include &lt;stdio.h&gt; int main (void) { printf (“Hello world!<br>”); return 0; }. A simple example. /* HelloWorld: A simple C program */ #include &lt;stdio.h&gt; int main (void) {

diata
Download Presentation

Computer Programming 0455-3391-01

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Programming0455-3391-01

  2. A simple example /* HelloWorld: A simple C program */ #include <stdio.h> int main (void) { printf (“Hello world!\n”); return 0; }

  3. A simple example /* HelloWorld: A simple C program */ #include <stdio.h> int main (void) { printf (“Hello world!\n”); return 0; } • This is a comment • comments help explain the program to someone • they are ignored by the computer

  4. A simple example /* HelloWorld: A simple C program */ #include <stdio.h> int main (void) { printf (“Hello world!\n”); return 0; } • This is an instruction to the compiler to insert the contents of a file named “stdio.h” into the program • supplies useful information for the compiler

  5. A simple example /* HelloWorld: A simple C program */ #include <stdio.h> int main (void) { printf (“Hello world!\n”); return 0; } • This tells the compiler we’re about to define a function, named main • main is a special function; it is where your program starts running

  6. A simple example /* HelloWorld: A simple C program */ #include <stdio.h> int main (void) { printf (“Hello world!\n”); return 0; } • This is a C statement • This statement calls a function named printf • It causes the text to be printed on the screen

More Related