10th Computer 2nd Half
10th Computer 2nd Half
MAIN SUI GAS ROAD NEAR NADRA OFFICE SHARAQPUR KHURD KOT ABDUL MALIK
10TH
Computer 50
Exam Syllabus
1. Sequential control is the ...... control structure in C- (A) Selection (B) (C) Relation (D) Default
language. Repetition
2. Which control structure repeats a set of statement for a (A) (B) (C) Selection (D) Relation
3. Which of the following is a selection statements? (A) if (B) for (C) while (D) do while
4. Which symbol is used if to enter the condition? (A) [ ] (B) " " (C) { } (D) ( )
5. C programming language also provides ...... to deal with (A) (B) (C) (D)
6. The index of an element in array is written within ...... (A) < > (B) [ ] (C) ( ) (D) { }
7. ...... is the output of the following code: (A) 0 (B) -1 (C) 1 (D) 3
8. If the size of an array is 50, the range of indexes will be ...... (A) 0-50 (B) 0-49 (C) 1-49 (D) 1-50
9. What will be the output of this code? (A) Punjab (B) Pun (C) Pak (D) Pakistan
voidabc ( )
printf("Punjab");
10. Each run of a loop is called: (A) Cycle (B) Iteration (C) Duration (D) Test
Q2. Write short answers of the following questions. (Any 12) 2X12=24
III . Draw a flowchart to show the basic flow of an if statement. IV . Draw a flowchart to show the structure of if-else
statement.
V . What is condition in if statement structure? VI . Describe general structure of the if-else statement.
VII . What is common mistake in compound statement? VIII . What is Switch-Case structure?
IX . What is the output of the following? X . Find the errors.
a=a+b; if(age>18);
b=a+b;
printf("a=%d,b=%d", a,b);
XI . Write the general syntax of array initialization. XII . Differentiate between array declaration and array
initialization.
XIII . Write the example of the declaration of a float type array XIV . Declare an array of float type to store marks of 40
XV . How is an array element accessed? XVI . How to read values from arrays using loops?
XVII . Describe the structure of for loop. XVIII . Define nested loop structure.
1. Write a program that takes the value of body temperature of 2. Write a program that displays larger one out of the three
a person as an input and displays “You have fever.” If body given numbers.
have fever.”