In C programming, a statement is a single executable instruction. It's the basic unit of execution within a C program. Here are some common types of statements in C:
x = 10;
{
int a = 5;
int b = 10;
int sum = a + b;
}
if (x > 0) {
printf("Positive\n");
}
for (int i = 0; i < 5; i++) {
printf("%d\n", i);
}
These are the fundamental building blocks of any C program, and understanding them is crucial for writing and understanding C code effectively.
The statements of a C program control the flow of program execution.In C language several kinds of statements are available. They are