Computer Application (DCA-305)
UNIT–I: Digital Computer Systems aur Basics
Digital Computer Systems
Section Explanation in Hinglish
Definition / Concept Digital Computer System ek machine hai jo
data ko digital roop (0 aur 1 - Binary) mein
process karta hai. Yeh instructions (program) ko
follow karke calculations karta hai aur logical
decisions leta hai.
Purpose Iska main maqsad hai data ko tezi aur
accuracy ke saath store, process aur retrieve
karna. Civil Engineering mein designs,
calculations aur project management ke liye
use hota hai.
Real-life Example Aapka Personal Computer (PC), Laptop, ya
Smartphone sab digital computer systems
hain.
Key Points Data ko binary form mein handle karta hai.
Input-Process-Output cycle pe kaam karta
hai.
Characteristics of Computer (Computer ki Visheshtayein)
Section Explanation in Hinglish
Definition / Concept Computer ki woh khoobiyan jo use insaan se
behtar banati hain.
Explanation 1. Speed (Gati): Bahut tez calculations karta
hai (milliseconds/nanoseconds mein). 2.
Accuracy (Sateekta): Hamesha sahi result
deta hai (agar input sahi ho). 3. Diligence
(Lagan/Mehnat): Bina thake, bore hue, aur
concentration lose kiye, ek hi kaam baar-baar
kar sakta hai. 4. Versatility (Bahumukhi):
Alag-alag tarah ke kaam kar sakta hai (jaise
typing, design, calculation, game khelna). 5.
Storage (Bhandaran): Bahut zyada data store
kar sakta hai aur jab chahiye tab wapas de
sakta hai.
Real-life Example Civil site pe complex Structural Analysis kuch
hi seconds mein karna.
Key Points Speed, Accuracy, Diligence, Versatility,
Storage computer ke five pillars hain.
History and Generations of Computer
Section Explanation in Hinglish
Definition / Concept Computer ka vikas (evolution) aur use
alag-alag generations (peedhiyon) mein
baantna, hardware technology ke change ke
base par.
Explanation Generations (Peedhiyan): 1. First Gen
(1940s-1950s): Vacuum Tubes use hue. Size
bahut bada, heat zyada. (Example: ENIAC). 2.
Second Gen (1950s-1960s): Transistors use
hue. Size chota hua, tezi badhi. 3. Third Gen
(1960s-1970s): Integrated Circuits (ICs) use
hue. Processing power aur badhi. (Example:
IBM 360). 4. Fourth Gen (1970s-Present):
Microprocessors (VLSI/ULSI) use hue.
Personal Computer (PC) ka zamana. Bahut
chote aur powerful. 5. Fifth Gen (Present and
Beyond): Artificial Intelligence (AI) aur
Natural Language Processing par focus.
(Example: Robotics, Voice Assistants).
Real-life Example Vacuum Tube TV se lekar aaj ke Smart TV tak
ka safar, jahan choti si chip sab kuch manage
karti hai.
Key Points Har generation mein size chota, speed zyada,
aur cost kam hui.
Types of Computers & their Classifications
Section Explanation in Hinglish
Definition / Concept Computers ko unke size, speed, aur
processing power ke hisaab se categories
mein baantna.
Explanation 1. Supercomputer: Sabse tez aur powerful.
Complex scientific calculations aur weather
forecasting ke liye. (Example: PARAM) 2.
Mainframe Computer: Bahut bade
organizations (jaise banks, railway) mein huge
data processing ke liye. 3. Minicomputer:
Mainframe se chote, lekin ab zyada use nahi
hote, inki jagah powerful workstations ne le li
hai. 4. Microcomputer (PC): Sabse common.
Jaise Desktop, Laptop, Tablet, Smartphone.
Personal aur office use ke liye.
Real-life Example ISRO mein rocket launch calculations ke liye
Supercomputer ka use. Aapke office mein
Desktop (Microcomputer) ka use.
Key Points Classification mainly power aur size par based
Section Explanation in Hinglish
hai. Microcomputer sabse zyada use hota hai.
Application of Computer in various fields (Alag-alag kshetron mein
Computer ka upyog)
Section Explanation in Hinglish
Explanation 1. Civil Engineering: CAD (Computer-Aided
Design) software (jaise AutoCAD) mein
structures design karna. Structural analysis
karna. Project Management (MSP) aur
estimation mein. 2. Education: Online classes,
e-books, research. 3. Banking: ATM, online
transactions, record keeping. 4. Medicine:
Diagnosis (MRI, CT Scan), surgery, patient
records. 5. Entertainment: Movies, games,
music.
Practical Use Civil site par AutoCAD drawings ko revise
karna. Billing aur quantity estimation ke liye
MS Excel use karna.
Key Points Computer har field mein efficiency, speed, aur
accuracy badhata hai.
Computer Hardware & Software
Section Explanation in Hinglish
Definition / Concept Computer system ke do main components:
Hardware (jise hum chhoo sakte hain) aur
Software (jo instructions ka set hai).
Elements of Computer Hardware (CPU, I/O devices, storage media)
Section Explanation in Hinglish
Explanation 1. CPU (Central Processing Unit): Ise
computer ka "Brain" kehte hain. Yeh saare
calculations aur decisions leta hai. Iske teen
main parts hain: ALU (Arithmetic Logic Unit -
calculation karta hai), CU (Control Unit - saare
operations control karta hai), aur Registers
(choti temporary memory). 2. I/O Devices
(Input/Output): - Input Devices: Data
computer ko dene ke liye. (Example:
Keyboard, Mouse, Scanner). - Output
Devices: Processed result user ko dikhane ke
liye. (Example: Monitor, Printer, Speaker). 3.
Storage Media (Memory): Data aur programs
store karne ke liye. - Primary Memory
(RAM/ROM): Tezi se access hoti hai. RAM
(Random Access Memory) volatile hoti hai
Section Explanation in Hinglish
(power off toh data gayab). ROM (Read-Only
Memory) non-volatile hoti hai. - Secondary
Memory (Hard Disk, SSD): Zyada data
permanently store karti hai. (Example: Hard
Disk Drive - HDD, Solid State Drive - SSD,
USB Drive).
Practical Use CPU drawing ko render karta hai. Keyboard se
drawing commands dete hain. Monitor par
drawing dekhte hain. Hard Disk mein drawing
file save karte hain.
Key Points Hardware physical part hai. CPU core
component hai.
Computer Software (Types of Software, System Software, Application Software)
Section Explanation in Hinglish
Explanation Software set of instructions (program) hai jo
computer ko batata hai ki kya karna hai. Types
of Software: 1. System Software: Computer
hardware ko manage aur control karta hai.
System software ke bina hardware kisi kaam ka
nahi. (Example: Operating System -
Windows, Linux). 2. Application Software:
User ke specific task ko perform karta hai.
(Example: AutoCAD, MS Word, Web
Browser, VLC Media Player).
Real-life Example System Software (Windows) bike ka engine
hai, jo bike ko chala raha hai. Application
Software (Google Maps) bike par destination
tak pahunchne ka tool hai.
Key Points System Software base hai, Application
Software user ke kaam ke liye hai.
UNIT–II: Operating System aur PC Software
Basic concept & functions of an Operating System (OS)
Section Explanation in Hinglish
Definition / Concept Operating System (OS) ek System Software
hai jo user aur computer hardware ke beech ek
interface (madhyam) ka kaam karta hai.
Functions 1. Memory Management: Decide karta hai ki
kis program ko kitni memory deni hai. 2.
Process Management: CPU ko manage karta
hai ki kon sa task kab aur kitni der ke liye
execute hoga. 3. File Management: Files ko
organize, store, aur retrieve karta hai (Folders
Section Explanation in Hinglish
banana, files save karna). 4. Security:
Password aur protection provide karta hai. 5.
Device Management: Saare I/O devices
(Printer, Mouse, etc.) ko manage karta hai.
Real-life Example OS ghar ke manager ki tarah hai, jo saare
resources (bijli, paani, bartan - yaani CPU,
Memory, Devices) ko theek se manage karta
hai.
Key Points OS computer ki jaan hai. Hardware aur user ke
beech bridge ka kaam karta hai.
Textual Vs GUI Interface
Section Explanation in Hinglish
Definition / Concept User aur OS ke beech communication ka
tareeka.
Explanation 1. Textual / CLI (Command Line Interface):
User ko commands type karke computer se
interact karna padta hai. Mushkil hota hai, lekin
bahut powerful aur tez hota hai. (Example:
DOS, Linux Terminal). 2. GUI (Graphical
User Interface): User mouse se icons,
buttons, aur windows par click karke interact
karta hai. Easy to use hota hai. (Example: MS
Windows, Mac OS, Android).
Real-life Example Textual - Jaise kisi ko letter likh kar instruction
dena. GUI - Jaise phone par icon par click
karke app kholna.
Key Points CLI keyboard-based, GUI mouse/touch-based
aur user-friendly.
Types of Operating Systems
Section Explanation in Hinglish
Explanation 1. Single-User OS: Ek time par sirf ek hi user
kaam kar sakta hai. (Example: Old DOS). 2.
Multi-User OS: Ek time par bahut saare users
alag-alag terminals se ek hi system ko use kar
sakte hain. (Example: Linux, Unix, Windows
Server). 3. Real-Time OS (RTOS): Time-bound
operations ke liye use hota hai jahan response
time bahut critical hota hai. (Example: Aircraft
control systems, Industrial robots). 4.
Distributed OS: Network se jude alag-alag
computers par faila hua OS.
Practical Use Railway Reservation System ek Multi-User
OS par chalta hai.
Section Explanation in Hinglish
Key Points RTOS time sensitive tasks ke liye important hai.
Concept of Multiprogramming, Multitasking, Multiprocessing
Section Explanation in Hinglish
Definition / Concept Programs ko efficiently manage karne ke tarike.
Explanation 1. Multiprogramming: CPU ko hamesha busy
rakhne ke liye ek time par multiple programs
ko memory mein load karna. Jab ek program
I/O operation ka wait karta hai, toh CPU doosra
program execute karta hai. (Single CPU) 2.
Multitasking: User ko lagta hai ki ek hi time
par kai tasks chal rahe hain (jaise gaana
sunna aur typing karna). CPU bahut tezi se
tasks ke beech switch karta hai. (Single CPU)
3. Multiprocessing: System mein ek se zyada
CPU hote hain. Alag-alag CPUs alag-alag tasks
ko simultaneously (ek saath) execute karte
hain. (Multiple CPUs)
Real-life Example Multitasking: Aapke laptop mein MS Word
chalaana aur gaana sunna. Multiprocessing:
Supercomputer mein hazaron calculations ek
saath karna.
Key Points Multi-tasking single CPU ka illusion hai.
Multi-processing real simultaneous execution
hai.
Introduction to Disk Operating System (DOS)
Section Explanation in Hinglish
Definition / Concept Ek Single-User, Single-Tasking,
Command-Line operating system, jo bahut
pehle PCs mein use hota tha.
Commands and Utilities 1. Internal Commands: Jo DOS ki memory
mein load hote hain. (Example: COPY CON -
file banana, DIR - files ki list dekhna, CLS -
screen clear karna, DATE - date set karna).
2. External Commands: Jo Hard Disk mein
separate files ke roop mein hote hain.
(Example: FORMAT - disk format karna,
CHKDSK - disk check karna).
Practical Use Aaj bhi troubleshooting aur system repair ke
liye iske concepts use hote hain.
Key Points DOS ek CLI based OS hai.
Working with MS Windows, Unix and Linux
Section Explanation in Hinglish
Explanation 1. MS Windows: Sabse popular, GUI based,
user-friendly OS. Personal aur office use ke
liye. (Proprietary Software - kharidna padta
hai). 2. Unix: Bahut powerful, stable, aur
Multi-User OS. Servers aur complex systems
ke liye zyada use hota hai. (Textual/CLI zyada
use hota hai). 3. Linux: Free aur
Open-Source OS, Unix par based. Bahut
secure aur customizable. Servers,
supercomputers, aur embedded systems mein
use hota hai. (Bahut saare
versions/distributions hote hain jaise
Ubuntu).
Practical Use Civil drawings banane ke liye aap Windows
use karte hain. Server Linux par chalte hain
jahan aapki website ya data stored hota hai.
Key Points Windows - Easy to use. Linux - Secure aur
Free.
Working knowledge of PC Software (Word Processor)
Section Explanation in Hinglish
Definition / Concept Ek Application Software jo documents
banane, edit karne, format karne aur print karne
ke liye use hota hai. (Example: MS Word,
Google Docs).
Practical Use Civil Engineering mein: - Reports (Project
Reports, Tender Documents). - Letters (Official
correspondence). - Bills of Quantities (BoQ)
ki basic lists banana. - Notes aur study material
banana.
Key Points Word Processor ka main focus text aur
document formatting par hota hai.
UNIT–III: Programming Fundamentals
Computer Languages
Section Explanation in Hinglish
Definition / Concept Ek tarika (Set of rules / Syntax) jiske through
hum computer ko instructions de sakte hain.
Explanation 1. Low-Level Languages: Computer hardware
ke bahut kareeb. (a) Machine Language: Sirf 0
aur 1 (Binary) mein hoti hai. Computer isko
direct samajhta hai. (b) Assembly Language:
Symbols (mnemonics) ka use karti hai.
Machine language se thoda easy, but phir bhi
Section Explanation in Hinglish
mushkil. 2. High-Level Languages: Insaan ki
bhasha (English) se zyada milti-julti. Samajhna
aur program likhna aasan hota hai. (Example:
C, C++, Python, Java).
Real-life Example Low-Level - Jaise computer ko uski jungle
bhasha (0/1) mein instruction dena.
High-Level - Jaise computer ko Hinglish mein
samjhana.
Key Points High-Level - Easy for human. Low-Level -
Easy for computer.
Generation of Languages
Section Explanation in Hinglish
Explanation 1st Gen (1GL): Machine Language (0s aur
1s). Directly understood by CPU. 2nd Gen
(2GL): Assembly Language (Mnemonics).
Assembler ki zarurat padti hai. 3rd Gen (3GL):
High-Level Languages (C, C++, Java).
Human-readable, Compiler/Interpreter ki
zarurat. (Programming ka main zamana). 4th
Gen (4GL): User ko sirf yeh batana hota hai ki
kya karna hai, kaise karna hai nahi.
(Example: SQL - Database queries). 5th Gen
(5GL): AI aur NLP par based. Machine ko
problem solve karne ke liye bolte hain, woh
khud code likhti hai.
Practical Use C (3GL) aage unit 4 mein padhenge. SQL
(4GL) data manage karne mein use hota hai.
Key Points Generation badhne se programming aasan aur
efficient hoti gayi.
Translators (Assemblers, Interpreters, Compilers)
Section Explanation in Hinglish
Definition / Concept Software jo High-Level / Assembly Language
ke program ko Machine Language mein
convert karte hain, taaki computer use samajh
sake.
Explanation 1. Assembler: Assembly Language program
ko Machine Language mein convert karta hai.
2. Compiler: Pure High-Level program
(Source Code) ko ek saath Machine Code
(Object Code) mein convert karta hai. Agar koi
error ho, toh poori list ek saath de deta hai.
(Example: C Compiler). 3. Interpreter:
High-Level program ko line-by-line execute
karta hai. Agar kisi line mein error ho, toh wahin
Section Explanation in Hinglish
ruk jaata hai. Debugging (error theek karna)
easy hota hai. (Example: Python Interpreter).
Real-life Example Compiler - Jaise ek poori kitab ka anuvaad
(translation) karna. Interpreter - Jaise press
conference mein ek-ek line ka turant anuvaad
karna.
Key Points Compiler tez execute karta hai. Interpreter
debugging mein easy hai.
Algorithm
Section Explanation in Hinglish
Definition / Concept Kisi bhi problem ko solve karne ke liye
step-by-step instructions ka set. Yeh
programming language se free hota hai.
Example Do numbers ko add karne ka Algorithm:
Step 1: Start. Step 2: Pehla number (A) input
lo. Step 3: Doosra number (B) input lo. Step 4:
Result = A + B calculate karo. Step 5: Result
print karo. Step 6: Stop.
Practical Use Programming shuru karne se pehle, problem
ko samajhna aur solution ka blueprint (nakshe)
banana.
Key Points Algorithm solution ka foundation hai. Clear,
precise, aur finite (khatam hone waala) hona
chahiye.
Pseudo-code
Section Explanation in Hinglish
Definition / Concept Algorithm ko programming language jaise
words (jaise READ, PRINT, IF-THEN-ELSE)
use karke likhna, lekin bina kisi specific
language syntax ke.
Example Do numbers ko add karne ka Pseudo-code:
START READ A, B SET Result = A + B PRINT
Result END
Practical Use Programming language mein code likhne se
pehle logic ko test aur design karna.
Key Points Pseudo-code algorithm aur actual code ke
beech ka step hai.
Flowcharts (Rules & Symbols)
Section Explanation in Hinglish
Definition / Concept Algorithm ko graphical roop mein symbols
aur lines ki madad se represent karna.
Symbols 1. Oval: Start / End (Program shuru aur
Section Explanation in Hinglish
khatam). 2. Parallelogram: Input / Output
(Data lena ya result dikhana). 3. Rectangle:
Process (Calculations, assignments). 4.
Diamond: Decision (Yes/No, True/False choice
lena). 5. Arrows (Flow Lines): Flow ki
direction batana.
Practical Use Program ka logic aur flow visually samajhna
aur doosron ko samjhana. Errors (bugs) ko
trace karna aasan hota hai.
Key Points Flowchart program ka visual representation
hai.
Structured Programming concepts
Section Explanation in Hinglish
Definition / Concept Ek programming technique jismein program ko
chote aur manageable blocks mein divide
kiya jaata hai, aur sirf teen basic control
structures use hote hain.
Explanation Teen basic structures: 1. Sequence:
Instructions ek ke baad ek order mein execute
honge. (Top-to-bottom flow). 2. Selection
(Chayan): Kisi condition ke base par choice
lena. (Example: IF-ELSE, SWITCH). 3.
Iteration / Repetition (Dohrana): Instructions
ke set ko baar-baar repeat karna. (Example:
FOR, WHILE, DO-WHILE loops).
Practical Use Aisa code likhna jo saaf, samajhne mein
aasan (readable), aur maintain karna easy ho.
Key Points Structure code ko simple aur systematic banati
hai. GOTO statement avoid kiya jaata hai.
Various techniques of programming & Use of programming
Section Explanation in Hinglish
Explanation Techniques: 1. Procedure Oriented
Programming (POP): Program ko chote
procedures (functions) mein divide karna.
(Example: C). Data aur functions alag-alag
hote hain. 2. Object Oriented Programming
(OOP): Program ko Objects ke roop mein
organize karna. Data aur uske functions ek
saath hote hain (Encapsulation). (Example:
C++, Java). Use of Programming: - Software
Development (Apps, OS, Games). -
Automation (Repetitive tasks ko khud-ba-khud
karna). - Data Analysis aur Machine Learning.
- Civil Engineering mein complex calculations
Section Explanation in Hinglish
ke liye custom software banana.
Practical Use OOP real-world problems ko modeling karne
mein behtar hai (jaise ek Car object banana,
jiske apne features aur actions ho).
Key Points POP process par focus karta hai. OOP data
(object) par focus karta hai.
UNIT–IV: Introduction to ‘C’ Programming
Introduction to ‘C’
Section Explanation in Hinglish
Definition / Concept C ek structured, procedural, High-Level
programming language hai, jise Dennis Ritchie
ne Bell Labs mein 1972 mein banaya tha. Ise
Middle-Level Language bhi kehte hain kyunki
yeh hardware ko bhi directly access kar sakti
hai.
Importance of C 1. Foundation: Kai doosri languages (C++,
Java, C#) C par based hain. Agar C aati hai,
toh baaki languages sikhna aasan ho jaata hai.
2. System Programming: Operating Systems
(jaise Linux) aur compilers C mein likhe gaye
hain. 3. Fast and Efficient: Iska execution
speed bahut tez hota hai. 4. Portable: Ek
computer par likha program doosre computer
par bina zyada change ke chal jaata hai.
Practical Use Civil mein Custom Scientific Calculation
Software banane ke liye C use ho sakti hai.
Key Points C programming ki "Mother Language" hai.
Portable aur Fast.
Basic Structure of a C Program
Section Explanation in Hinglish
Concept Har C program ek standard format follow karta
hai.
Explanation 1. Documentation Section: Comments (// ya /*
*/) likhte hain, jo compiler ignore kar deta hai.
Program ke baare mein jaankari dete hain. 2.
Link Section: Header files include karte hain
(libraries). Jaise \#include <stdio.h> for
Input/Output functions. 3. Definition Section:
Symbolic constants define karte hain. 4. Global
Declaration Section: Variables jo poore
program mein use honge, unhe yahan declare
karte hain. 5. Main() Function: Har C program
Section Explanation in Hinglish
ka starting point. Execution hamesha is
function se shuru hota hai. Iske andar body
hoti hai ({ ... }). 6. Subprogram / User-Defined
Functions: Program ke chote parts jo main()
function call karta hai.
Example \#include <stdio.h> // Link int main() // Main
Function { printf("Hello Civil!"); // Body return 0;
}
Key Points main() function zaruri hai. Har statement ke
end mein semicolon (;) lagana hota hai.
Constants, Variables and Data Types
Section Explanation in Hinglish
Definition / Concept 1. Constants: Program execution ke dauran
inki value change nahi hoti. (Example: 3.14
for PI). 2. Variables: Memory location ka
naam jahan data store hota hai. Inki value
change ho sakti hai. (Example: int a; jahan a
variable hai). 3. Data Types: Variable kis tarah
ka data store karega, aur kitni memory lega,
yeh batata hai.
Explanation (Data Types) 1. int (Integer): Poore numbers (bina decimal
ke) jaise 10, -5. 2. float (Floating Point):
Decimal waale numbers jaise 10.5, -3.14. 3.
char (Character): Single character jaise 'A', 'b',
'7'. 4. double: float se zyada precision waale
decimal numbers.
Practical Use Civil mein, float use hoga agar aap length
(10.5 m) store kar rahe hain. int use hoga agar
aap number of beams (5) store kar rahe hain.
Key Points Variable ko use karne se pehle declare karna
zaruri hai.
Operators and Expressions
Section Explanation in Hinglish
Definition / Concept Operators symbols hote hain jo compiler ko ek
mathematical ya logical operation perform
karne ke liye kehte hain. Expressions
operators aur operands (variables/constants)
ka combination hote hain.
Explanation 1. Arithmetic Operators: Calculations ke liye.
(Example: +, -, *, /, % - Modulo for
remainder). 2. Relational Operators: Do
values ko compare karne ke liye. Result True
(1) ya False (0) mein aata hai. (Example: >, <,
Section Explanation in Hinglish
== - equals to, != - not equals to). 3. Logical
Operators: Do ya do se zyada conditions ko
combine karne ke liye. **(Example: && - AND, `
Example Expression: (area > 100) && (type == 'R')
(Agar area 100 se zyada ho AUR type 'R' ho)
Key Points = (Assignment) aur == (Equality check) mein
confusion nahi hona chahiye.
Managing I/O Operators
Section Explanation in Hinglish
Definition / Concept User se input data lena aur output result user
ko dikhana. Yeh stdio.h (Standard Input Output)
header file ke functions se hota hai.
Explanation 1. printf(): Output screen par print karne ke
liye. (Example: printf("Area is: %f", area);).
%f jaise Format Specifiers use hote hain. 2.
scanf(): User se Input lene ke liye. (Example:
scanf("%d", &num);). Variable ke naam se
pehle ampersand (&) (Address-of operator)
lagana zaruri hai. 3. getchar(), putchar():
Single character I/O ke liye. 4. gets(), puts():
String (text line) I/O ke liye.
Practical Use scanf() se user se structure ki length, width
input lena. printf() se final load calculation
dikhana.
Key Points Format Specifiers (%d for int, %f for float) ka
sahi use zaruri hai.
Control Statements
Section Explanation in Hinglish
Definition / Concept Statements jo program ke flow of execution
ko control karte hain (Sequence, Selection,
Iteration).
Selection (Conditional) Statements: ‘IF’ statement and its various forms, switch
statement
Section Explanation in Hinglish
Explanation 1. if Statement: Agar condition True ho toh ek
block execute hoga. 2. if-else: Agar condition
True ho toh if block, nahi toh else block
execute hoga. 3. if-else if-else (Nested if): Jab
ek se zyada conditions check karni ho. 4.
switch Statement: Jab ek hi variable ko
multiple fixed values se compare karna ho.
Yeh if-else if ladder ka alternative hai aur
Section Explanation in Hinglish
zyada clean hota hai. Har case ke baad break
lagana zaruri hai.
Example Agar material_type 'A' ho toh cost $100, 'B' ho
toh $200. (switch use hoga).
Key Points if - Condition ke base par decision leta hai.
switch - Value match karne par decision leta
hai.
Iteration (Looping) Statements: for, while and do-while loops
Section Explanation in Hinglish
Definition / Concept Ek set of instructions ko baar-baar repeat
(dohrana) karna jab tak ek condition True ho.
Explanation 1. while loop: Pehle condition check hoti hai,
phir body execute hoti hai. Agar condition shuru
mein hi False ho toh body ek baar bhi execute
nahi hogi. 2. do-while loop: Pehle body ek
baar execute hoti hai, phir condition check hoti
hai. Yani, body kam se kam ek baar toh
execute hogi hi. 3. for loop: Jab humein pata
ho ki loop kitni baar chalana hai. Ismein
Initialization, Condition, aur
Increment/Decrement teenon ek hi line mein
hote hain.
Practical Use for loop - Agar aapko 10 beams ke liye
calculation karni hai (Fixed iterations). while
loop - Jab tak user 'Y' input de, tab tak program
chalate rehna (Unknown iterations).
Key Points for aur while Entry-Controlled loops hain.
do-while Exit-Controlled loop hai.
Unconditional Jump Statement: goto statement
Section Explanation in Hinglish
Definition / Concept Program ke flow ko program mein kisi doosri
jagah (label) par seedhe jump karwana.
Explanation goto label_name; likh kar flow ko label_name:
par transfer kiya jaata hai. Aam taur par ise
structured programming mein avoid kiya
jaata hai, kyunki yeh code ko samajhne mein
mushkil (spaghetti code) bana deta hai.
Key Points goto avoid karna chahiye.
Arrays (Array notation, storage and representation)
Section Explanation in Hinglish
Definition / Concept Ek hi data type ke multiple values ko ek hi
variable mein store karne ka tarika. Yeh
Section Explanation in Hinglish
consecutive memory locations mein store
hote hain.
Explanation 1. Notation: data_type array_name[size];
(Example: int marks[5]; - 5 integers store
honge). 2. Index: Array elements ko unke
index (position) se access karte hain. Index
hamesha 0 se shuru hota hai. Pehla element
marks[0] hoga. 3. Two-Dimensional Array (2D
Array): Table ke roop mein data store karna.
(Example: int matrix[3][3]; - 3 rows, 3
columns).
Practical Use Civil mein, ek hi structure ke bahut saare
load values ya survey readings ko store
karne ke liye array use hota hai.
Key Points Array ek hi type ke data ka collection hai.
Index 0 se start hota hai.
Functions (User-defined functions and their use)
Section Explanation in Hinglish
Definition / Concept Ek self-contained block of code jo ek specific
task perform karta hai. Jab iski zarurat hoti hai,
toh isko call kiya jaata hai.
Explanation 1. User-Defined Functions: Jo programmer
khud banata hai. (Example: calculate_area()).
2. Parts of a Function: - Declaration /
Prototype: Compiler ko batana ki function
maujood hai. - Definition: Function ke
andar ka actual code. - Call: Function ko
execute karne ke liye bulana. Use: -
Modularity: Program chote, manage-able parts
mein divide ho jaata hai. - Reusability: Ek hi
function ko alag-alag jagah par baar-baar use
kar sakte hain.
Real-life Example Function ek specialist mechanic ki tarah hai.
Jab bhi engine repair ki zarurat ho, use call
karo, woh sirf wahi kaam karega.
Key Points Functions program ko organize karte hain. Ek
function value return kar sakta hai.