+1-617-874-1011 (US)
+44-117-230-1145 (UK)
+61-7-5641-0117 (AU)

Available 24 x 7 Assignment Help

With Tutoring

The while statement

The simplest of all looping structure in C is the While Statement. The general format of the While Statement is:

while (test condition)
body of the loop

Here the given test condition is checked and if the condition is true then the body of the Loop is executed. After the execution of the body, the test condition is once again evaluated and if it is true, the body is executed once again. This process of repeated execution of the body continues until the test condition finally becomes false and the control is transferred out of the Loop.

On exit, the program continues with the statements immediately after the body of the Loop. The body of the Loop may have one or more statements. The braces are needed only if the body contained two are more statements.

#include <stdio.h>
#include <conio.h>
int main()
int x=0;
char ch;
printf("Enter a phrase whose length has to be found(terminated by enter key): \n");
while(ch!= '\n')
printf("Length is: %d",x-1);

The above program returns the number of characters of a phrase or statement which is terminated by return key.

Below is the output of program :

while statement
While Statement Assignment Help

Topics in C Programming

Simple Calculator
Scientific Calculator
EMI Calculator
Mortgage Calculator
Love Calculator
Percentage Calculator
Currency Calculator
Units Converter
Graph Calculator
Financial Lease Calculator
Temperature Converter
24 x 7 Availability.
Trained and Certified Experts.
Deadline Guaranteed.
Plagiarism Free.
Privacy Guaranteed.
Free download.
Online help for all project.

Urgenthomework helped me with finance homework problems and taught math portion of my course as well. Initially, I used a tutor that taught me math course I felt that as if I was not getting the help I needed. With the help of Urgenthomework, I got precisely where I was weak:


  Urgent HomeWork

Disclaimer: The study tools and academic assistance/guidance through online tutoring sessions provided by Urgenthomework.com is to help and enable students to compete academically. The website does not provide ghostwriting services and has ZERO TOLERANCE towards misuse of the services. In case any user is found misusing our services, the user's account will be immediately terminated.
Copyright © 2009-2022 UrgentHomework.com, All right reserved.