Lession 1 : The first C programming.
#include stdio.h
int main()
{
printf("Hello World");
return 0;
}
According to the C90 and C99 standard main should return int.
#include <stdio.h>
stdio.h : "standard library C". This is written by the technical committee
main.c -> main.i (open the standard library)(full code from scratch) -> main.s(assembly) -> main.o (machine code)
int main()
{
printf("Hello World \n");
printf("Today is a good day");
}
\ : it's the escape character
n : it's the new line
\n : it's the escape sequence
/r : move the curso back to the beginning of the line
#include <stdio.h>
int main (){
printf("David says , \" Programming is fun !\"\n");
printf("**Conditions apply , \"Offers valid until tomorrow\"\n");
printf("C:\\My computer\\My folder\n");
printf("D:/My documents/My file\n");
printf("This is a triple quoted string \"\"\" This month has 30 days \"\"\"");
}