0% found this document useful (0 votes)
14 views4 pages

C Programming Lab Guide 2024

This document outlines the first lab session for programming in C, detailing the necessary software and tools, such as CodeBlocks and Windows OS. It includes instructions on how to create, save, compile, and run a C program that calculates the area of a circle. Additionally, it provides a brief overview of essential functions and commands used in C programming.

Uploaded by

lisashreosiahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

C Programming Lab Guide 2024

This document outlines the first lab session for programming in C, detailing the necessary software and tools, such as CodeBlocks and Windows OS. It includes instructions on how to create, save, compile, and run a C program that calculates the area of a circle. Additionally, it provides a brief overview of essential functions and commands used in C programming.

Uploaded by

lisashreosiahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab No: 1 Date: / /2024

Lab Name: e„‡Ëi †ÿÎdj wbY©q Kivi Rb¨ GKwU wm †cÖvMÖvg|

ZË¡ (Theory):

‡cÖvMÖv‡g †Kvb G·‡cÖkb wKsev dvsk‡bi †k‡l hLb †mwg‡Kvjb (;) †`qv nq, ZLb wm fvlvq GK †m÷‡g›U ejv nq| ‡cÖvMÖv‡g
†WUv Z_v †fwi‡qe‡ji gvb MÖnY Kivi Rb¨ e¨eüZ †m÷‡g›U‡K BbcyU †m÷‡g›U ejv nq| Kx-‡evW© †_‡K w÷ªs RvZxq †WUv
Bbcy‡Ui Rb¨ wm-‡Z K‡qK ai‡bi †m÷‡g›U e¨envi Kiv nq| h_v- scanf(), getc(), gets(), getchar()
BZ¨vw`| ‡cÖvMÖv‡g †WUv Z_v †fwi‡qe‡ji cÖ`k©b Kivi Rb¨ e¨eüZ †m÷‡g›U‡K AvDUcyU †m÷‡g›U ejv nq| Kx-‡evW© †_‡K
w÷ªs RvZxq †WUv cÖ`k©‡bi Rb¨ wm-‡Z K‡qK ai‡bi †m÷‡g›U e¨envi Kiv nq| h_v- printf(), putc(),
puts(), putchar() BZ¨vw`|

cÖ‡qvRbxq nvW©Iq¨vi: GKwU Kw¤úDUvi (Computer)

cÖ‡qvRbxq mdUIq¨vi:

1. Acv‡iwUs wm‡÷g (Operating System) – DB‡ÛvR (Windows)


2. †U·U GwWUi (Text Editor/IDE) – ‡KvWeK¬m (CodeBlocks)

e¨eüZ †cÖvMÖvwgs fvlv ( Programing Language): wm †cÖvMÖvwgs (C Programing )

hš¿cvwZi e¨envi (Uses of Device):

1. cÖ_‡g Kw¤úDUv‡i we`y¨r ms‡hvM †`B


2. UPS Ab Kwi (hw` _v‡K)
3. Monitor Ges CPU Gi Power Button G ‡cÖm (Press) K‡i Kw¤úDUvi Ab Kwi
4. cÖ‡qvRbxq mKj ai‡bi Software Install Av‡Q wK bv †`‡L †bB, bv _vK‡j Install Kwi|

cÖwµqv AbymiY (Process):

1. cÖ_‡g Start > CodeBlocks > CodeBlocks wb‡`©k w`‡q CodeBlocks Open Kwi| CodeBlocks
Open n‡j File > New > Empty File wb‡`©k w`‡q A_ev Ctrl + N, ‡cÖm (Press) K‡i GKwU File ‰Zwi Kwi|
2. File > Save A_ev Ctrl + S, ‡cÖm (Press) K‡i C Program File wU
Area of a circle.c bvg w`‡q Desktop G Save Kwi| wb‡Pi wbq‡g C Program ‰Zwi Kivi Rb¨ cÖ‡qvRbxq †KvW UvBc Kwi|
Area of a circle.c

e¨vL¨v (Description):
ফাংশন/ে�টেম� KvR/e¨vL¨v

/*------*/ WKz‡g‡›Ukb †mKkb| †cÖvMÖv‡gi wewfbœ welq eY©bv Kivi Rb¨|

#include ‡nWvi dvB‡ji mv‡_ wjsK ¯’vcb Kivi Rb¨|

<stdio.h> ÷¨vÛvW© BbcyU/AvDUcyU dvskb e¨envi Kivi Rb¨|

main() cÖwZwU †cÖvMÖv‡gi Avek¨Kxq dvskb|

{ } †cÖvMÖv‡gi wbe©vn‡hvM¨ Ask| cÖwZwU dvsk‡bi ïiæ I ‡kl †evSv‡Z|

float ‡d¬vwUs c‡q›U †WUv †NvlYv Ki‡Z|

%f ‡d¬vwUs c‡q›U †WUv †evSv‡bvi K‡›Uªvj|

& (Variable Memory Addres)

printf() †Kv‡bv wKQz cÖ`k©b Kivi Rb¨|

scanf() Kx-‡ev‡W©i gva¨‡g †WUv BbcyU †bIqvi Rb¨|


Compile:
Build > Build wb‡`©k w`‡q A_ev Ctrl + F9, ‡cÖm (Press) K‡i ‡cÖvMÖvg Compile Kwi| ‡cÖvMÖv‡g †Kvb fzj _vK‡j ms‡kvab K‡i Save
Kwi, bv _vK‡j ‡cÖvMÖvg Run Kwi|

Run Ges djvdj:


Build > Run wb‡`©k w`‡q A_ev Ctrl + F10, ‡cÖm (Press) K‡i ‡cÖvMÖvg Run Kwi| cÖ‡qvRbxq †WUv BbcyU w`‡q Enter ‡cÖm (Press)
Kwi| Zvn‡j wb‡Pi djvdj cvIqv hv‡e

You might also like