Short Notes Computer Science
Short Notes Computer Science
Loops are used to execute a statement or number of statements for a specified number of times. Loops
are used to access a sequence of values.
{
statement 1;
statement 2;
:
statement N;
}
Example
int i, n = 4;
for(i = n; i >= 0; i--)
printf(“Pakistan”);
Q.8. What is "for" loop?
For loop executes one or more statements for a specified number of times. This loop is also
called counter-controlled loop. It is the most flexible loop. That is why the most programmer
use this loop in programs
Ch#14: Function in C
Short Questions
Q:1 What is pointer? Also write example.
Q:2 What is EOF?
Q:3 What is Stream?