;
(
must be closed with a close parenthesis )
{
must be closed with a close curly braces }
"
must be matched with a close quote "
[
must be closed with a close square bracket ]
main
function is the start of our program, analogous to start of a lettermain(){}
is how we define a functionmain
()
, there are no arguments expected for the main function{}
, what the function does is defined in the curly bracketsprintf
printf
"Hello World\n"
and "Bye World\n"
#include <stdio.h>
to gain more functionality\n
tells the computer to output a newline, read more about escaping characters at http://en.wikipedia.org/wiki/Escape_sequences_in_C// everything after the 2 slashes is ignored
/* this comment can end
on a different line */
// this is also a comment. Executable code can exist before the slashes
/* File: example.c
By: Christopher Manloloyo
login: manaloloy
Date: 20 August 2017
Mod: 20 August 2017
*/
#include <stdio.h> //include header files (like the standard input output Library we just mentioned)
// This is where we define the main function
main() //this portion is the header
{
/* Everything in this portion
is the Body */
}