Professional Documents
Culture Documents
Memory
a b
25 S
Variables
Rules
c. no comma/blank space
Types
Integer Character
Constants Real Constants
1, 2, 3, 0
Constants 'a', 'b', 'A',
, -1, -2 1.0, 2.0, '#', '&'
3.14, -24
Keywords
Reserved words that have special
meaning to the compiler
32 Keywords in C
Keywords
auto double int struct
do if static while
#include<stdio.h>
int main() {
printf("Hello World");
return 0;
}
Comments
Lines that are not part of program
new line
printf(" kuch bhi \n");
Output
CASES
1. integers
printf(" age is %d ", age);
2. real numbers
printf(" value of pi is %f ", pi);
3. characters
printf(" star looks like this %c ", star);
Input
a.exe (windows)
Hello.c C Compiler
a.out (linux & mac)