Computer_Assignment_Solutions_Part2
Computer_Assignment_Solutions_Part2
- Constants are fixed values that cannot be altered during the execution of a program.
Classification:
1. **Type Declaration Instructions**: Declare variables and constants, e.g., `int a;`.
6. Draw the flowchart of the program which creates the simple interest.
1. Start.
4. Output SI.
5. Stop.
1. Start.
3. Initialize a = 0, b = 1.
4. Print a, b.
5. Repeat for i = 3 to n:
a. c = a + b.
b. Print c.
c. Update a = b, b = c.
6. Stop.
Loops are used to repeat a block of code multiple times until a specific condition is met, reducing
3. **do-while loop**: Similar to while but executes at least once before checking the condition.
11. What are the differences between while and do-while loops?
Example:
```c
if (i == 5) break;
```
- The `continue` statement skips the rest of the loop body and proceeds to the next iteration.
Example:
```c
if (i == 5) continue;
```
14. What are the different types of header files used in C program?
Types: