Unit-2 Loops in C Programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

CHAPTER 5

LOOPS
5.0 Objectives
5.1 Introduction
5.2 The while statement
5.3 The do-while statement
5.3.1 More about while and do
while
5.4 The for statement
5.4.1 More about for loops
5.4.2 Nesting of for loops
5.5 The break statement
5.6 The continue statement
5.7 Summary
5.8 Check Your Progress - Answers
5.9 Questions for Self-Study
5.10 Suggested Readings

5.0 OBJECTIVES
Friends,
after study this lesson you will be able to-
• state the meaning of loops
• explain the loop constructs in C - while, do-while and for
• use loop nesting
• use break and continue statements in loops
• write much more sophisticated and interesting programs in C.

5.1 INTRODUCTION
Uptil now, we have seen how to use the sequential and decision control structure
to write programs. In this chapter, we shall see the loop control structures in C. Loops
are used in order to execute an instruction or a set of instructions repeatedly until a
specific condition is met.
Thus, in looping, a sequence of statements will be executed until some condition
for the termination of the loop is satisfied or they will be executed for a specified
number of times. The first one is variable loop and the second from of loops is the fixed
loop.
A program loop has two segments :
- the body of the loop (It is the set of statements which are to be executed till
the condition is satisfied)
- the control statement
(The statement which will check the conditions and direct the program to execute
the body till the condition is true)
Fig. 1 illustrates the loop control structure.
In the logic depicted in Fig.1 a, the test condition is first checked and then the
body of the loop is executed if the condition is true. If the condition is not true the body

Loops / 103
of the loop will not be executed. Such a loop is called as entry controlled loop. In
Fig. 1b, the body of the loop is executed without checking the condition for the first
time. Then, the test condition is checked. Such a structure is called as exit controlled
loop. Thus, in an exit controlled loop, the body of the loop will be executed at least
once (even if the test condition is false for the first time).
It is important that we state our test conditions for the loops with great care. The
loop should perform the desired number of executions only and then transfer control
outside the loop. If by mistake, we give an erroneous test condition, the body of the
loop may be executed over and over again infinite number of times. The control may
not be transferred out of the loops. Such situations set up infinite loops.

C language provides three types of loop constructs to repeat the body of the loop
a specified number of times or until a particular condition is met. They are :
- The while statement
- The do-while statement
- The for statement

5.2 THE WHILE STATEMENT


The general form of the while statement is
while (test condition)
{
body of the loop;
}
The while construct starts with the while keyword followed by the test condition
in the parenthesis. The body of the loop is included in the pair of braces. (The pair of
braces is not required if there is only one statement within the loop body. If there are
more than one statements, the braces are essential. It is a good idea to have the
braces anyway).
When the while keyword is encountered the test condition is checked. (This

C Programming / 104
means that the while loop is an entry controlled loop construct). If it evaluates to true,
the body of the loop is executed. Then the control again goes back to while. The
condition is checked and again the body of the loop executed if true. Thus, the process
repeats until the condition in the while loop evaluates to true. When the condition finally
becomes false, the body of the loop is skipped and control is transferred to the
statement which immediately follows the body of the loop.

The following example will illustrate the use of the while statement:
Example:
/* Program to calculate the sum of first ten numbers */
main()
{
int i, sum;
sum = 0;
i = 1;
while(i<=10)
{
sum = sum + i;
i = i ++;
}

Loops / 105
printf(“\nThe sum is %d”, sum);
}
The output of the program :
The sum is 55
The flowchart of the above program is depicted in Fig.2
This program calculates the sum of the first ten numbers. Thus it will get
executed for the value of the variable i = 1, 2, 3, ... 10. When i becomes 11, the while
condition will become false and the body of the loop will not be executed. The control
will be transferred to the printf statement.
From the above example you can see that the while loop is useful in situations
where you want to execute a set of instructions for a specified number of times. Thus
a while loop in general will include the following steps :
- Initialise the counter (to execute the instructions for a specified number of times)

- Check the test condition


- Execute the body of the loop
- Increment the counter and again go back to checking the condition
The test condition in a while loop may use relational and logical operators. The
while loop must have a test condition in such a way that finally it has to become
false at some point, else it will fall in an infinite loop.
It may so happen that erroneous coding and initialisation results in a program
falling in a situation where it will never come out of a loop. The following code
is an example which will make the program fall in an infinite loop :

C Programming / 106
Example:

main()
{
int i;
while (i<=10)
{
i =1
printf(“\nThe value of i %d”, i);
i = i ++;
}
}

Every time the program enters the body of the loop, it will reset the counter i
to 1. Therefore the test condition will always be true and the program control will never
fall out of the loop.
When using the counter, you can not only increment it, but also decrement it.
Further the counter need not be an integer type only. It can also be real, Let us
rewrite the above program by decrementing the counter:
Example:

/* Program to calculate the sum of first ten numbers */


main()
{
int i, sum;
sum = 0;
i = 10;
while( i>=1)
{
sum = sum + i;
i = i-1;
}
printf(“The sum is %d”, sum);
}

Here we initialise the counter variable i to 10 and decrement it in the body of the
loop. The loop gets executed till the value of i becomes 1 (i.e. decrements from 10 to
1)
In all the above examples we can make use of the increment/decrement operators
in place of statement like i = i + 1; or i = i - 1. We have studied these operators in
our previous chapters. To revise, let us see them again here :
C has ++ as the increment and - as the decrement operator. The increment
operator adds 1 to the operand and the decrement operator subtracts 1 frorn the
operand. Both are unary operators.

Form of the Increment operator:


++a ;

Loops / 107
or
a++;
which is equivalent to
a = a + 1;
Form of the decrement operator:
--a;
or a--
which is equivalent to
a = a - 1;

Example :
The following example will illustrate the use of the while loop to read a character
and print it until the escape sequence “\n” is encountered :
/*Program to illustrate the use of getchar() and putchar() in a while loop*/
#include “stdio.h”
main()
{
char ch 1;
ch1 = getchar(); /* Read a character*/
while(ch1 != “\n”);
{
ch1 = getchar();
putchar(ch1);
}
}
The Odd Loop : (Variable Loop)
We have used the while loop so far to write programs where we knew the number
of times the loop was to be executed. But in actual practice, there may be numerous
situations where it is not known in advance how many times the loop is to be executed.
Such programming situation is demonstrated with the help of the following example :
Example :
/*Program to demonstrate the odd loop */
main()
{
char ans = ‘Y’, ch1;
while(ans == ‘Y’)
{
ch1 = getche();
printf(“\nYou entered : %c”, ch1);
printf(“Do you want to continue (Y/N) ?”);
scanf(“%c”, &ans);
}
}
In this program, you read a character from the keyboard using the getche()
function and print the same on the screen. You then prompt the user whether he wishes
to input another character. If the user enters ‘Y’, the while loop gets executed again.
This process will continue till you keep entering a ‘Y’ to enter more characters. The
moment you enter any character other than ‘Y’, the loop will terminate. Thus, it is
possible to execute such while loops as many times as desired.

C Programming / 108
5.1 & 5.2 Check Your Progress
1. What will be the difference in the output, if any, in the examples
(i) and (ii) in each of the following :
a) (i) int a = 1;
while(a==1)
{
a = a - 1;
printf(“\n%c”, a);
}
(ii) int a = 1;
while(a==1)
a = a -1;
printf(“\n%d”, a);

b) (i) int a = 2;
while(a >=1)
{
a = a -1;
printf(“\n%d”, a);
}
(ii) int a = 2;
while(a >= 1)
a = a -1;
printf(“\n%d”, a);

2. Which of the following statements are valid :


a) c = a ++ - b;
b) while(i = 10)
c) while(p <=q)
d) while(z!=10)
e) while(i > 10 && (j < 50 || k> 20))

3. Fill in the blanks :


a) In an ........................... controlled loop, the body of the loop will be
executed at least once.
b) A program loop has two segments ............................ and
...........................
c) The loop constructs which C provides are .................................,
............................. and ....................................
d) The ............................. loop is used where it is not known in advance
how many times the loop is to be executed.

5.3 THE DO-WHILE STATEMENT


As we have seen in the previous section, the while loop checks the test
condition before executing the body of the loop i.e. it is an entry controlled loop.
Hence, if the test condition is false for the first time itself the loop may not get
executed at all.

Loops / 109
Another form of loop control is the do-while. This loop construct is an exit
controlled loop i.e. it checks the test condition after executing the loop body. The body
of the loop thus gets executed at least once in a do-while loop. This is the only
difference between the while and do-while. Otherwise, while and do-while behave exactly
in the same way. There are very few programming situations in actual practice where
the do-while loop is required.

The general form of the do-while is :


do
{
body of the loop
}
while(test condition);
When the program encounters the do statement, it executes the body or the
loop first. It then checks the test condition and if true transfers the control back to the
first statement in the loop body. This process continues till the test condition is true.
When the condition becomes false, the subsequent statement is executed. Fig3.
shows the flowchart for the do-while construct.
We shall see the use of do-while with the following example :
Example:
/* Program to illustrate the use of the do-while*/
main()
{
int i, prod;
i=1
prod=1;

C Programming / 110
do
{
prod = prod * i;
i++;
}
while(i<=10);
printf(“The product of the first 10 numbers is %d”, prod);
}
This program calculates the product of the first ten numbers 1,2,3... 10.

5.3.1 More about while and do-while :


- In the While and do-while loop constructs multiple expressions can be
combined with the help of logical operators.
eg. while((i<=10)&&(a>b))
Here the while loop will be executed only if both the expressions are true since they
are connected by the logical AND operator.
A few other examples :
while ((a< = b) || (z > 0))
while ((a< b) || (b > c) || (c >d)
- Nesting of while loops :
It is also possible to nest one while loop inside another. Let us see how to do this with
the help of the following example :
Example : The program illustrates nested while
main()
{
int i, j;
i = 1;
j = 1
while (i <=5)
{
j = 1;
while (j <=5)
{
printf(“*”);
j=j + 1;
}
printf(“\n”);
i = i + 1;
}
}
The output of the program is :
*****
*****
*****
*****
*****
This program contains two nested do-while loops. The inner dowhile executes
five times for each iteration of the outer while. Note that when the inner loop is

Loops / 111
executing it prints one * each time on the same line. After j becomes 6 this loop exits,
and the printf takes the cursor to the new line. i is incremented and the inner loop
again gets executed five times. Carefully follow the program through each step.

5.3 Check Your Progress.


1. Answer the following :
a) What is the difference between the while and the do-while?
...................................................................................................
...................................................................................................
b) What is meant by nesting of loops ?
...................................................................................................
....................................................................................................
c) How will you combine multiple expressions in a while loop ?
....................................................................................................
....................................................................................................

2. Determine how many times each of the following loops will be


executed.
a) x = 5;
while (x<= 10)
{
printf(“%d”, x);
}
...................................................................
.................................................................

b) i = 1;
do
{
printf(“\nExample of do-while”);
i = i + 1;
}
while (i <=1);
.................................................................
.................................................................

c) i = 1;
while (i <=1)
{
printf(“\nExample of while”);
i = i + 1;
}
.................................................................
.................................................................
3. Write a program to find ab by making use of while, (i.e a x a xa ..
b times)

....................................................................................................................
....................................................................................................................

C Programming / 112
5.4 THE FOR STATEMENT
The for statement is probably the most frequently use loop construct. The for
statement provides initialisation of counter, test condition and counter increment all in
a single line. The general form of the for statement is :
for(initialisation; test-condition; increment)
{
body of the loop;
}

We specify the following things in the parenthesis following the for keyword :
- First is the initialisation of the loop counter. This is done with the use of
assignment operators as :
i = 1 or k = 1 or count = 0
- Second is the test condition which determines when the loop will exit. The body
of the loop is executed till the test condition is true. When it becomes false, the loop
is exited.
- Third is incrementing the value of the loop control variable (counter) after the
loop body has be executed. The new value of the counter is again checked to see if
it satisfies the loop condition.
Fig. 4 shows the flowchart for the for loop :
The for loop is an entry controlled loop construct. It first checks the test
condition and if it is true only then it executes the loop body. We shall see how to use
the for loop with the help of this example :
Example :
/* Program to illustrate the use of the for loop */
main()

Loops / 113
{
int i;
for(i = 1; i <=5; i++)
{
printf(“The value of i %d\n”, i);
}
}
The program prints the values of i from 1 to 5.
It is clear from the above, that the value of the loop counter also called the
control variable is initialised to 1 in the for loop. The test condition (i <= 5) is then
checked. If it is true, the loop body is executed. The counter is then incremented and
the test condition checked again. This sequence continues till the test condition is true.
When it becomes false the loop body is exited. Note that the statements enclosed
within the parenthesis are separated by semicolons. There is no semicolon after the
increment statement and after the for statement.
5.4.1 More about for loops :
- As in the case of while, we can not only increment but also decrement the
value of the control variable in the for statement.
- You can also omit one or more sections of the for loop. eg.
main()
{
int i;
i = 1; for(;i<=10;)
{
printf(“%d\n”,i);
i = i++;
}
}
Here the initialisation of the counter variable is done before the for statement.
Also the counter is incremented within the for loop and not in the for statement. This
is allowed. However, the semicolons are a must although there are no statements
of initialisation and counter increment in the for statement itself. Be careful to
use them if you are trying to initialise or increment the counter outside of the for
statement. Note that if you do not set any test condition the for statement will fall in
an infinite loop.
- You can also initialise more than one variable in a for statement as follows :
k=1;
for (i = 1; i<=10 ; i++)
{
body of the loop
}
can also be written as
for(k=1, i=1; k=10, i++)
{
body of loop
}
Note that the initialisation section initialises the variable k and i. These variables
are separated by a comma.
- The increment section can also have more than one part where each part will

C Programming / 114
be separated by a comma. eg.
for(i = 1; i<=10; i++, p=p+1)
is a valid for statement.
- It is also possible to increment and compare the counter in the same statement
eg. for (i = 0; ++i <=10;)
Here the counter is incremented and compared in the same statement ++i <=10.
Since the increment operator has a higher priority the counter will first be incremented
and then compared. Remember it is necessary to initialise i to 0. Also take a note of
the semicolon after ++i <= 10.
-The test condition need not be limited only to the loop control variable. It can
be a compound relation combining two or more arithmetic relations with logical relations
eg. for(i = 1; k=10 && sum <100;i++)
This loop will check both the test conditions (i <=10 and sum <100). If both are
true then the for loop will be executed. (Refer the truth table of logical operators in the
previous chapter).
Before proceeding to the next section carefully study all the above variations of
the for loop and practice them with various examples.
5.4.2 Nesting of for loops :
We have seen how if statements and while statements can be nested. Similarly
it is possible to nest for statements. The nesting of loops can be best demonstrated
with the help of an example :
Example : We shall use the same example of printing * which we have used
for demonstrating the nested while loop.
/* Program to illustrate nesting of for loops */
main()
{
int i, j.sum;
for(i=1 ;i<=5;i++)
{
for(j=1 ;j<=5;j++)
{
printf(“*”);
}
printf(“\n”);
}
}
The output of this program will be :
*****
*****
*****
*****
*****
For each value of i (from i = 1 to i = 5) the inner loop (for j = 1 to j = 5) will
be executed five times. The variable j will take values from 1 to 5. When j is incremented
next time, its value becomes 6 and the inner for loop is exited. The printf(“\n”) will take
the cursor to the next line. Then the value of i (the control variable of the outer loop)
will be incremented. If the test condition is true, the program will enter the body of the
loop. The variable j will again be initialised to 1 and the loop will be executed five times.
This process will continue till the test condition becomes false.

Loops / 115
5.4 Check Your Progress.
1. Correct the following statements and rewrite :
a) (for i == 1, i < 10, i++);
.................................................................................

b) for (count = 0; count <= 5 && k > 2; count++;)


.................................................................................

c) i = 0;
for (i < 5, i++)
.................................................................................
2. Write the following program using for loop to generate the following
output:
*****
****
***
**
*
3. Write a program to print the sum of the first five odd numbers using for
loop.
4. Write a program to print the first five odd numbers after any number input
from the keyboard.

5.5 THE BREAK STATEMENT


In some situations it may be required to jump out of the loop without going back
to the test conditions. For example, if you are checking a list of names and at the first
occurrence of a particular name you wish to exit the for loop or as soon as you
encounter the first even number in a list you wish to exit the for loop. In such situations
we make use of the break. We have seen the use of the break keyword when we
studied the case construct. break works in the same way in for and while loops as
it works in the case construct.
When the break statement is encountered in a loop, the loop is exited and the
control is transferred to the statement immediately following the loop.
The use of the break keyword for various loop constructs is illustrated below :

with the while statement as:

while(test condition)
{
--------
--------
if(condition)
break;
--------
--------
}
statement-a;
with a do statement as :

C Programming / 116
do
{
--------
--------
if(condition)
break;
--------
--------
}while(--------)
statement-a;

with the for statement as :


for (--------)
{
--------
--------
if(condition)
break;
--------
--------
}
statement-a;
In the process of executing the loop in each of the above situations, when the
break is encountered the loop is exited. Thus in the above, if the condition in the
parenthesis after if is true, the loop is exited and control is transferred to statement-
a.
Let us use the break statement to write a program
Example : To illustrate the use of break
main()
{
char ch;
ch = getchar();
while(ch != ‘N’)
{
if(ch=’z’)
break;
printf(“%c”, char);
ch = getchar();
}
}
The program will read a character from the keyboard till the user inputs ‘N’.
Within the loop body if the character read is ‘z’ it will break from the while loop. Study
the program carefully and rewrite for various conditions.

5.6 THE CONTINUE STATEMENT


The continue statement passes the control to the beginning of the loop. Thus
when a continue is encountered in a loop, the following statements inside the body
of the loop are skipped and control is transferred to the beginning of the loop for the
next iteration.

Loops / 117
Thus, the difference between the break and the continue is that break causes
the loop to be terminated whereas continue causes the following statements to be
skipped and continue with the next iteration.
The use of continue in loops is illustrated below :

in while
while(test condition)
{
--------
--------
if(condition)
continue;
--------
--------
}

in the do-while
do
{
--------
--------
if(condition)
continue;
--------
--------
} while (test condition)

in the for loop


for(initialisation;test condition;increment)
{
_____________
_____________
if(condition)
continue;
_____________
_____________
}

In the while and do while when the continue statement is encountered the
remaining statements in the loop body are skipped and the test condition is checked.
In the case of for statement, when the continue statement is encountered the remaining
statements in the body of the loop are skipped, the counter is incremented and then
the test condition is checked.
Let us see the use of the continue :
Example :
main()
{
int num = 1;
while(num != 0)
{
printf(“\nEnter number:”);

C Programming / 118
scanf(“%d”, &num);
if(num%2 == 0)
continue;
printf(“\nNumber is %d”, num);
}
}
A sample output:
Enter number: 2
Enter number: 3
Number is 3
Enter number: 7
Number is 7
Enter number: 0
If a number entered is even then the remaining part of the loop is skipped with
the continue statement. On the other hand, if the number is odd the number is printed.
The user will be inputting numbers till he enters a 0. Upon entering a 0, the program
ends.

5.5 & 5.6 Check Your Progress.


1. Write in brief about 2/3 lines
a) The break statement:
...................................................................................................
...................................................................................................
b) The continue statement:
.....................................................................................................
.....................................................................................................
1. Select the correct option :
a. The break statement is used to exit from :
(i) an if statement
(ii) a for loop
(iii) main()
(iv) none of the above
b. The continue statement :
(i) continues program execution from the first line outside the loop construct
(ii) passes control to the beginning of the loop
(iii) cannot be used in a loop
(iv) is a substitute for break
c. A while statement :
(i) executes at least once
(ii) executes only if the condition is true
(iii) is exactly similar to the do-while
(iv) is an exit controlled loop construct
d. In a for loop the statements in the bracket are:
(i) separated by commas
(ii) are separated by a semicolon
(iii) Multiple statements cannot be written at all
(iv) None of the above

Loops / 119
5.7 SUMMARY
In this chapter we have seen different types of loop control structure.
Loops are used in order to execute an instruction or a set of instructions
repeatedly until a specific condition is met. In looping a sequence of statements will
be executed until some condition for the termination of the loop is satisfied or for a
specified number of times. A program loop has two segments :
C language provides three types of loop constructs to repeat the body of the loop
a specified number of times or until a particular condition is met. They are :

- The while statement


- The do-while statement
- The for statement
The for loop and while loop are the example entry controlled loop. It first checks
the test condition and if it is true only then it executes the loop body. Whereas do while
loop is the example of exit controlled loop. This loop constructs checks condition after
executing the loop body.

5.8 CHECK YOUR PROGRESS - ANSWERS


5.1 & 5.2
1. a) Output of (i) & (ii) is same i.e. 0.
b) Output of (i) is 1, 0 and output of (ii) is 0.
2. a) Invalid
b) Invalid
c) Valid
d) Valid
e) Valid
3. a) exit
b) the body of the loop, the control statement
c) while, do-while, for
d) odd
5.3
1. a) The while loop checks the test condition before executing the body of the loop
i.e. it is an entry controlled loop. Hence, if the test condition is false for the first
time itself the loop may not get executed at all. The do-while loop construct is
an exit controlled loop i.e. it checks the test condition after executing the loop
body. The body of the loop thus gets executed at least once in a do-while loop.
This is the only difference between the while and do-while.
b) It is possible to nest one loop construct in another while or do-while loop
construct. In such a situation, the inner loop gets executed the specified number
of times for every iteration of the outer loop. Thus if an inner loop is to be
executed five times and the outer loop thrice, then for each iteration of the outer
loop the inner loop gets executed five times. The outer loop itself gets executed
three times.
c) In the while and do-while loop constructs multiple expressions can be combined
with the help of logical operators. The logical operators are AND, OR and NOT.
The loop gets executed depending upon the evaluation of the expression connected

C Programming / 120
by the logical operators. The program becomes easy to read and more structured
when the logical operators are used to combine multiple expression in one loop
construct.
2. a) Infinite
b) One
c) One
3. main()
{
int a, b, prod, count;
printf(“Enter value of a :”);
scanf(“%d”, &a);
printf(“Enter value of b :”);
scanf(“%d”, &b);
count = 1;
prod = 1;
while(count <= b)
{
prod = prod * a;
count = count + 1;
}
printf(“\na raised to b = %d”, prod);
}

5.4
1. a) (for i = 1; i < 10; i++)
b) for (count = 0; count <= 5 && k > 2; count++)
c) i = 0;
for (; i < 5; i++)
2. main()
{
Int i, j;
for(i = 5; i >= 0; i—)
{
for(j = 0; j <= i; j ++)
printf(“*’’)
printf(“\n’’);
}
}
3. main()
{
int i, sum;
sum = 0;
for(i = 1; i<= 10; i = i + 2)
sum = sum + i;

Loops / 121
printf(“The sum of first five odd numbers is : %d, sum);
}
4. main()
{
int num, i, sum;
printf(“Enter a number:’’);
scanf(“%d’’, &num);
sum = 0;
if (num % 2 != 0)
{
for(i = num ; i < num + 10; i = i + 2)
sum = sum + i;
}
else
{
for(i = num + 1; i <= num + 10; i = i + 2)
sum = sum + i;
}
printf(“The sum is : %d’’, sum);
}

5.5 & 5.6


1. a) The break statement : In some situations it may be required to jump out of the
loop without going back to the test conditions. In such situations we make use
of the break. break works in the same way in for and while loops as it works
in the case construct. When the break statement is encountered in a loop, the
loop is exited and the control is transferred to the statement immediately following
the loop.
b) The continue statement : This statement passes the control to the beginning of
the loop. Thus when a continue is encountered in a loop, the following statements
inside the body of the loop and skipped and control is transferred to the beginning
of the loop for the next iteration. In the while and do while when the continue
statement is encountered the remaining statements in the loop body and skipped
and the test condition is checked. In the case of for statement, when the
continue statement is encountered the remaining statements in the body of the
loop are skipped, the counter is incremented and then the test condition is
checked.
2. a) a for loop
b) Passes control to the beginning of the loop.
c) executes only if the condition is true.
d) are separated by a semicolon

5.9 QUESTIONS FOR SELF STUDY

1. Write short notes on :


a) Additional features of the for statement.
b) Entry controlled and exit controlled loops.
c) The break and continue statements.

C Programming / 122
2. Write a program in C to find the first five numbers divisible by 7 between 101
to 200 and break as soon the numbers are found.

3. Write a program to find Armstrong numbers between 1 to 1000. A number is


an Armstrong number if the sum of the cubes of each digit of the number is the
number itself. eg. 153 = (1 * 1 * 1) + (5 * 5 * 5) + (3 * 3 * 3)
4. Write a program to print ascii values and their corresponding characters from
0 -255 making use of the while construct.
5. Explain in detail with the help of a flowchart :
a) The do-while loop construct
b) The for construct

5.10 SUGGESTED READINGS

Programming in ANSI C : Balguruswamy


Exploring C : Yashwant Kanitkar
Programming in ANSI C : Balguruswamy



Loops / 123

You might also like