Professional Documents
Culture Documents
Control Structures in c
Control Structures in c
else
statement 2;
statement 1;
statement 2;
20. Write the general
Ans. do
syntax of do.. while?
statement 1;
statement 2;
}while (condition);
21. Write the general
syntax of for loop?
Ans. for(expr1; expr2; expr3)
statement 1;
statement 2:
goto label;
label:
5.6 Exercise
1.
What are control statements? statements?
2. What are different forms ofit statement
3. Explain any two forms of'if' statements. if
numbers using stitement
4. oftwo statements. it-elsc'
5. Write a program to find largestnested-if-else
oddor
evenusing
6.
Give the syntax of if-else, whether anuumber
and is