Sometimes we want some part of our code to be executed more than once. We can repeat the code in our program. For example, we need to display our name for a hundred or more times it is not practical to write the same code. Which concept will be used? Explain it with the help of suitable example
It's loops. Example:
prints 10 times "Hello!"
for (int i = 0; i < 10; i++) {
printf("Hello!\n);
}
Other constructions:
Comments
Leave a comment