Akash Kumar Pathak
1. W h a t do you mean by st r u ct u r e programming? Discuss it s various fe atu res.
S tr uc tur ed Programming is a programming paradigm aimed a t improving t h e
cl arity , q ua li ty , and developm ent t im e o f s o f t w a r e by using w e l l - organized
code. I t emphasizes a logical s tr uc t ur e in programs, making t h em easier t o
read, debug, and m odify .
Features o f St ruct u re d Programming
Mo du larit y
T o p- Down Design
Code Reusability
Sequential Flow o f Control
[Link] various d a t a types used in C
Basic D at a Types
Derived D at a Types
User-Defined D at a Types
Void D at a Type
[Link] d i f f e r e n t types o f con stan t used in C
In C, constants re fe r t o f i x e d values t h a t do n o t change during t h e execution o f
a program. There are several types o f constants in C, categorized based on thei r
d a ta t y p e and representation. Here are t h e main types:
Integer Constants
Float ing-Point Constants
Character Constants
String Constants
Symbolic Constants
Enumeration Constants
4. Wh at are t h e various operators used in c.
In C, operators are symbols t h a t pe rf orm operations on variables and values.
They can be classified in t o d i f f e r e n t types based on th eir f u n ct io n a li t y
Arit hm et ic Operators
Relational (Comparison) Operators
Logical Operators
Bitwise Operators
Assignment Operators
Increment and Decrement Operators
Ternary (Conditional) Operator
Type Casting Operator
5. Explain d i f f e r e n t types o f loop in C
In C, loops are used t o execu te a block o f code repeatedly as long as
a specified condition is me t. There are three main types o f loops in C:
1. f o r Loop
#include <stdio.h>
i n t main() {
f o r ( in t i = 1; i <= 5; i++) {
pr intf("% d ", i);
}
re tu rn 0;
}
2. while Loop
#include <stdio.h>
i n t main() {
i n t i = 1;
while (i <= 5) {
print f("%d ", i);
i++;
}
re tu rn 0;
}
3. d o - while Loop
#include <stdio.h>
i n t main() {
i n t i = 1;
do {
pr in tf( "%d ", i);
i++;
} while (i <= 5);
r et ur n 0;
}