C Programming QnA
C Programming QnA
Answer 1: 2x5=10
1. Data types define the type of data a variable can hold (e.g., int, float, char).
2. i++ returns the original value before incrementing, whereas ++i increments first.
3. Variable names must start with a letter/underscore, can contain letters/digits, and are
case-sensitive.
4. (9AE.BC)16 to Binary: 1001 1010 1110 .1011 1100
5. Algorithm: A step-by-step procedure to solve a problem.
6. Base values: Octal = 8, Hexadecimal = 16.
7. Goto statement leads to difficult-to-maintain "spaghetti code."
8. Break terminates a loop; Continue skips the current iteration.
Answer 2: 5x2=10
Generations of computers:
1st: Vacuum tubes, 2nd: Transistors, 3rd: ICs, 4th: Microprocessors, 5th: AI & Quantum.
C program to find average of numbers in an array, and pattern printing using loops also included.
Answer 3: 10x2=20
String handling functions (Concatenation & Comparison) without standard header files.
Function: A reusable code block. Difference: Formal args are declared in function, Actual args are
passed.