Skip to Main Content
Fundamentals of Computer Programming and IT by Pearson
book

Fundamentals of Computer Programming and IT by Pearson

by Ashok Namdev Kamthane, Rohit Khurana
May 2024
Intermediate to advanced content levelIntermediate to advanced
577 pages
22h 34m
English
Pearson India
Content preview from Fundamentals of Computer Programming and IT by Pearson
Control Structures 317
11.13 THE while LOOP
Another kind of loop structure in C/C++ is the while
loop. It’s format is given below.
Syntax:
while (test condition)
{
body of the loop
}
The test condition may be any expression. The loop state-
ments will be executed till the condition is true i.e., the
test condition is evaluated and if the condition is true,
then the body of the loop is executed. When the condi-
tion becomes false the execution will be out of the loop.
The execution of the loop is shown in Figure 11.4.
The block of the loop may contain single state ment
or a number of statements. The same block can be
repeated. The braces are needed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Basic Computer Engineering (Subject Code: BE - 205)  by Pearson

Basic Computer Engineering (Subject Code: BE - 205) by Pearson

Anita Goel, Anand Motwani

Publisher Resources

ISBN: 9781299447479