KPK Board 12th Class Computer Ch 4 Control Structures Short Questions Answers
We are providing all Students from 5th class to master level all exams preparation in free of cost. Now we have another milestone achieved, providing all School level students to the point and exam oriented preparation question answers for all science and arts students.
After Online tests for all subjects now it’s time to prepare the next level for KPK board students to prepare their short question section here. We have a complete collection of all classes subject wise and chapter wise thousands questions with the right answer for easy understanding.
We provided 12th class Computer short questions answers on this page of all KPK boards. Students of KPK boards can prepare the Computer subject for annual examinations.
In this List we have included all KPK boards and both Arts and Science students. These Boards students can prepare their exam easily with these short question answer section
Malakand Board 12th classes short questions Answer
Mardan Board 12th classes short questions Answer
Peshawar Board 12th classes short questions Answer
Swat Board 12th classes short questions Answer
Dera Ismail Khan Board 12th classes short questions Answer
Kohat Board 12th classes short questions Answer
Abbottabad Board 12th classes short questions Answer
Bannu Board 12th classes short questions Answer
All above mention KPK Boards students prepare their annual and classes test from these online test and Short question answer series. In coming days we have many other plans to provide all kinds of other preparation on our Gotest website.
How to Prepare KPK Board Classes Short Question Answer at Gotest
- Just Open the desired Class and subject which you want to prepare.
- You have Green bars which are Questions of that subject Chapter. Just click on Bar, it slides down and you can get the right answer to those questions.
The statements which allow the programmer to control the sequence of execution of statements of a program by the processor are called control flow statements.
The most commonly used control flow statements are:
Decision statements
Repetition statements
Compound statements
The statement that causes the program to change the way of execution, sequence of execution, based on the value of an expression is called decision statement. Decision statement is also called conditional statement.
The most commonly used decision statements are:
If statements
If-else statements
Nested if-else statements
Switch statements
In C++ program, a programmer sometimes needs to execute one statement or of group of statements if certain condition is true and another statement or group of statements if the certain condition is false. This is only possible with the use of decision statements C++.
The nested ‘if-else’ and ‘switch’ statements are used when there are multiple choice and only one is to be executed.
Difference between nested ‘if-else’ and ‘switch’
Nested if
It is difficult to use when there are multiple choices.
It uses multiple expressions for multiple choices.
It can check a range of value.
It can check variable also.
User can use constant or variable in relational expression.
Switch
It is easy to use when there are multiple choices.
It uses single expression for multiple choices.
It cannot check a range of value.
It checks only constant values.
User cannot use variables with case statement.
‘Break’ statement is used to make jump from one part of a program to another. ‘Break’ statement is used in two situations: one in switch – default structure to properly end a case portion and another in loops to leave a loop.
‘Exit’ function is used to immediately terminate a running C++ program. The exit function takes an integer, usually 0, as a parameter that is returned to the operating system as an exit code and tells it that the program has terminated normally.
Difference between ‘while’ and ‘do- while’ loop is;
While loop
In while loop, condition comes before body of the loop
If condition is false in start, while loop is never executed
Do-while loop
In do-while loop, condition comes after body of the loop.
Do-while is executed at least once even if condition is false in start.