coderstrust presentation on c language
TRANSCRIPT
C language
Srabon sabbir trail student Coderstrust Ctg :005 Id 1478
What is C Language
Invented by Ritchie
Invented in 1972
Published in 1978
Computer Language
Why use C Language
Mother language
Connect with registers
Run program fast
Develop apps & games
How a C program looks like
#include <stdio.h>int main (){ printf (“Hello World”); return 0;}
Header part
Main body
Keywords & Variables in C Language
int , float, char, if, else, for, while, switch, return, void. keywor
d
add_srabon, Add_srabon,ctg001, Addition, SUBTRACTION .
Variable
Data types and Constants in C Language
Integer data (-1, 0, 1) Float data (.-1, .1, .11) Character data (a ,b ,A)
Newline Character (\n) Horizontal tab (\t) Vertical tab (\v)
Data types
constant
An example of C program
#include <stdio.h>int main (){int a,b,add;printf (“Enter the numbers:”);scanf (“%d%d”,&a,&b);add=(a+b);printf (“The result is:%d\n”,add);return 0;}
Conditional operator
if, else if, else
print(true statement)
Conditions: block1&block2
trueprint(b
1)false
print(b2)
Looping in C Language
Continue execution
while loop , for loop,do while loop
Different times (10,100)
Function in C Language
Do fixed work
show result when called
Sub file of main function
ANY QUESTIONS?