You are on page 1of 4

Vallipurathanpalayam, Erode.

Annual Examination 20192020


Computer Science Max. Marks : 20
Exam No : __________
Std / Sec : VIII _____ Theory: Total: Time : 40 mins.
Invigilator’s Sign: __________
Teacher’s Sign: ___________
Date : 05.04.2019 Practical: Grade:
General Instructions: Parent’s Sign: ____________
∗ Read each question carefully and follow the instructions.
∗ Attempt all questions.
I. Fill in the Blanks (2½)
1. ____________ statement is used to transfer the control out of switch case.
2. if…. else if statement is also called as___________________________.
3. A collection of data that holds fixed number of values of same type is called an ________________.
4. To repeat the group of statements for a specified number of times are called as ______________.
5.__________________ statement alter sequential process.
II. Answer the following.
1. Write the syntax with an example for array variable declaration and initialization value (10,20).
(1)
________________________________________________________________________________________

________________________________________________________________________________________
2.Write a condition in c++ to check whether a number is equal to 10 or not using IF statement. (1)
________________________________________________________________________________________
4. Identify the errors in the following code and rewrite it (2)
main ()
{
Int a,B;
for(i==0,i<10;i+);
{
cout<<” @;
}
getch();
}
5. List any three rules for ‘switch case’ statement. (3)
___________________________________________________________________________
____________________________________________________________________________

1
6. Complete the following code and write its output. (1½)
#include<iostream.h>
OUTPUT:
#include<conio.h>
void main()
{
clrscr();
int a[5]={5,10,12,15,40}, _____;
for(i=0;i<5;_____________)
{
_____________________
}
Getch();
}
IV. Answer the following question
1. Differentiate between while and do-while loop. (1)

2
2. Write a C++ program for the following.
a. To check whether the given number is divisible by 5 or not. (2)

b. To display the series of 20,27,24,21……… using Loop (3)

3
b. To check the odd number series of 1 to 5 using switch case. (3)
(2)

You might also like