Assignment #3 C Program
Assignment #3 C Program
Assignment #3
Answer:
Iteration in C language refers to the process of executing a set of statements repeatedly until a
specified condition is met. It helps in reducing code redundancy by using loops. There are three
types of iteration structures in C:
1. For Loop
2. While Loop
3. Do-While Loop
---
Answer:
A for loop in C is a control structure that allows repeated execution of a block of code a fixed
number of times. It consists of three parts:
Example:
#include <stdio.h>
int main() {
int i;
for(i = 1; i <= 5; i++) {
printf("Iteration %d\n", i);
}
return 0;
}
---
Q3: C Program for Data Analysis in International Relations
A simple C Program:
#include <stdio.h>
int main() {
int n, i;
float tradeSum = 0, tradeAvg;
float tradeValues[n];
return 0;
}