16
t t মিড লেভ ষা মিভেভ মে একমি জনমিয় যেত ষা। উভেে ষা মিাে মে মি মিভেভ মিা িমতান িভি মে লিখাভনা িয়। কে লিাগাভিে মেমিই ি মে তাই ো , মে লক িজোভ উপাপন কোই আিাে ি য। লতািো যমদ আিাে লেখা একি ি: লযাগ মদভয় পি এেং একি কভে অনিীেন কে তভে লতািো মনভজে িভখই একথা ীকাে কেভ এেং অোক িভে লয, মে এত ি! চভো ো এো লথভকই কমে আিো এিনোভ কে লযন িভজই ঝভত পামে লকান লেিভি লকন যেত ি? মনভচে লিাািমি কে: #include<stdio.h> #include<conio.h> void main() { printf(“This is my first c programming”); getch(); } Output: রোোম রোন করল নলɕো ফোফ োোয়ো যোলে: This is my first c programming মূ ণনো: ) আমরো ˤˠলেই েখলোনি #include<stdio.h> এেং #include<conio.h> নেলয় ˤˠ করো লয়লছ। এখোলন stdio.h এর ূনণˠ standard input output header file এেং conio.h এর ূণˠ control input output header file . এখন রɳ এʦলো কন যেোর করে ? আিো একটো গɫ লোন। এর মলযযই উর রলয়লছ। একজন োক গˠ নকনলে। এখন গˠর মোনলকর কোলছ নগলয় োক লছ, ভোই আমোর এক গˠ নকনলে লে এখন আন যনে আনোর গˠ আমোর কোলছ নেনি কলরন আমোর উকোর ে। গˠর মোনক গˠ নেনি করোর নো নলয় - আলছ আন মোলে

C & C+Programming for Beginner

Embed Size (px)

Citation preview

, : , !

? : #include #include void main() { printf(This is my first c programming); getch(); }

Output: : This is my first c programming : ) #include #include stdio.h standard input output header file conio.h control input output header file . ? , -

t

t

, ? - - , stdio.h conio.h stdio.h printf() conio.h getch() , stdio.h conio.h #include stdio.h conio.h ) void main() , { } main() void } return ; ) printf() ; ( ) output ) getch() output output window menu output TANBIR AHMAD RAZIB MOBILE NO:01916457075 @ 01738359555 E-MAIL :[email protected]/// [email protected] FACEBOOK SEARCH:Tanbir Ahmad (or, [email protected]) WEB SITE: www.tanbir.99k.org

, ? , : #include #include void main() { int a;

t

t

int b; int Result; printf(First Number:); scanf(%d,&a); printf(Second Number:); scanf(%d,&b); Result=a+b; printf(Result=%d,Result); getch(); } : , - , ? - - , ? - - , ? - - : . : . : -

t

t

: ? ? ) , int a; int b; int Result int integer ( ) int ? - , a , b , Result ) - : printf() : (First Number) scanf() a scanf(%d,&a); %d , int int float %f %d &a a input ) - : printf() (Second Number:) b scanf(%d,&b) statement %d ? b %d &b ) Result=a+b; statement a b Result ) printf(Result=%d,Result); statement ( ) Result=%d , Result= %d %d ? Result %d OUTPUT: : First Number:10 Second Number: 20 Result=30 #include #include

t

t

void main() { int a,b,Result; printf(First and Second Number:); scanf(%d%d,&a,&b); Result=a+b; printf(Result=%d,Result); getch(); } int a; int b; int Result; int int a,b,Result; printf() First and Second Number: scanf() a b : int long int long int int -32768 +32768 long int -217483648 -2147483647 %d %ld , #include #include void main() {

t

t

getch(); } { } , ?

: . . : . . ( ) . : #include int main() { printf( I am alive! Beware.n ); getchar(); return 0; } : . #include stdio.h . main(){.} , . printf( I am alive! Beware.n ); I am alive! Beware.

t

t

. n . getchar();

,

.

Tc tc c: tc bin tc.exe c , tc.exe

#include int main() {

t

t

printf( I am alive! Beware.n ); getchar(); return 0; } Alt+F9 ; Alt+F9 , ctrl+F9 I am alive! Beware. ctrl+F9

- ( ) ( ) , , **..* : http://bn.wikipedia.org/wiki/

TANBIR AHMAD RAZIBMOBILE NO:01916457075 @ 01738359555 E-MAIL :[email protected]/// [email protected] FACEBOOK SEARCH:Tanbir Ahmad (or, [email protected]) WEB SITE: www.tanbir.99k.org

: . . . parts of speech

t

t

1. Keyword 2. Identifier 3. Constant 4. Operator 5.Special Symbol 1. Keyword: auto break case char const double int else long struct switch

enum register typedef extern return union float short unsigned

continue for default goto do if

signed void sizeof volatile static while

. Identifier: Identifier. . , . space . . Keyword Identifier TANBIR AHMAD RAZIBMOBILE NO:01916457075 @ 01738359555 E-MAIL :[email protected]/// [email protected] FACEBOOK SEARCH:Tanbir Ahmad (or, [email protected]) WEB SITE: www.tanbir.99k.org

t

t

: . .integer: : , -,,,+ , . real: -.,-. . . single: : x,'5,. . string: : Hello, 787

variable , , , . . , . / - : Average, height,Counter_1,TutorialBD

num1,num2 sum : int num1;

t

t

int num2; int sum; num1 num2 : scanf() scanf(%d,&num1); scanf(%d,&num2); %d &num1 sum=num1+num2; - sum num1 num2 sum printf(Sum is: %d,sum); : #include #include int main() { int num1; int num2; int sum; printf(Enter num1 and num2\n); scanf(%d,&num1); scanf(%d,&num2);

t

t

sum=num1+num2; printf(The sum is %d,sum); getch(); } ( - ) - - Bangla Tutorials.flv

TANBIR AHMAD RAZIBMOBILE NO:01916457075 @ 01738359555 E-MAIL :[email protected]/// [email protected] FACEBOOK SEARCH:Tanbir Ahmad (or, [email protected]) WEB SITE: www.tanbir.99k.org

#include #include void main() { int gd=DETECT, gm; initgraph(&gd, &gm, c:\\turboc3\\bgi ); circle(200,100,150);

t

t

getch(); closegraph(); }

:. graphics.h . int gd=DETECT, gm; initgraph(&gd, &gm, c:\\turboc3\\bgi ); c:\\turboc3\\bgi bgi . circle(200,100,150); . closegraph()

/* shapes.c example 1.1 */ #include #include void main() { int gd=DETECT, gm; int poly[12]={350,450, 350,410, 430,400, 350,350, 300,430, 350,450 }; initgraph(&gd, &gm, ); circle(100,100,50); outtextxy(75,170, Circle); rectangle(200,50,350,150); outtextxy(240, 170, Rectangle); ellipse(500, 100,0,360, 100,50); outtextxy(480, 170, Ellipse); line(100,250,540,250); outtextxy(300,260,Line);

t

t

sector(150, 400, 30, 300, 100,50); outtextxy(120, 460, Sector); drawpoly(6, poly); outtextxy(340, 460, Polygon); getch(); closegraph(); }

:

: . outtextxy() . arc(int x , int y, int , int , int ); . pieslice(int x, int y, int , int , int );

t

t

: setcolor(int ); BLACK: 0 BLUE: 1 GREEN: 2 CYAN: 3 RED: 4 MAGENTA: 5 BROWN: 6 LIGHTGRAY: 7 DARKGRAY: 8 LIGHTBLUE: 9 LIGHTGREEN: 10 LIGHTCYAN: 11 LIGHTRED: 12 LIGHTMAGENTA: 13 YELLOW: 14 WHITE: 15 http://electrosofts.com/cgraphics/index.html

t

t

( )

http://www.facebook.com/tanbir.cox Tanbir Ahmad http:// tanbir.99k.org

\_DO \ \_NOT \ \_FORGET\ \_TO \ \_call! \ \_And TO\ \_Say \ \_Thanks\

t

t