Computer Science - kendriya vidyalaya

advertisement
KENDRIYA VIDYALAYA
HALF YEARLY EXAMINATION 2015-16
CLASS XI
COMPUTER SCIENCE
…………………………………………………………………………………………………………………………………………
BLUE PRINT
Very short
Answer
Question
(VSA)
1 mark
UNIT 1
UNIT 2
UNIT 3
1
3
1
Short
Answer
Question
(SA)
Type 1
2 marks
1
2
1
UNIT 4
4
9
2
2
Total
9
13
5
5
Total question:32
Total Marks : 70
Short
Answer
Question
(SA)
Type 1
3 marks
1
1
1
Long Answer
Question
(LA)
4 marks
Total
1
1
1
10
14
10
36
KENDRIYA VIDYALAYANTPC SHAKTINAGAR
HALF YEARLY EXAMINATION 2015
Time Allowed:3 Hrs.
Note:
o
o
o
o
o
o
Class:XI (Science)
Sub:Comp. Sc.
Max. Marks: 70
All questions are compulsory.
Programming language used C++.
Question 1 carry 1 mark each, Total 10 marks
Question 2 to 11 carry 2 marks
Question 12 to 15 carry 3 marks
Question 16 to 22 carry 4 marks
Q.1
Every question carry 1 mark
a)
What is nibble?
b)
What is token in c++ code?
c)
What is difference between source code and executable code?
d)
Write the corresponding expressions for : 2-ye 2y _ 4y
e)
List the memory measuring units in descending order till GB(Giga Bytes)
f)
What is the role of header files?
g)
What do you mean by function prototype.
h)
What is jump statement? Name any two.
i)
What do you mean by assembler.
j)
What is cache memory.
Q.2
Differentiate between unary and binary operator.
Q.3
Find errors in given code, If any, rewrite the correct code and underline the
correction
#include(iostream.h)
int main()
{
Intx,y,
Cin<<x;
For(y=1,y<x,y++)
Cout<<x*y;
}
Q.4
Differentiate between Entry Control Loop and Exit Control Loop.
Q.5
Name the header file(s )required in the given code:
void main()
{
char name[40];
strcpy (name,”bharat”);
strrev(toupper(name));
puts (name);
}
Q.6
What is difference between break and continue.
Q.7
What is type casting? Give example
Q.8
Name the header files for given functions:
i) exit( )
ii) pow( )
Q.9 What will be the output assuming all header files are there:
char outer,inner;
for (outer=’F’; outer >=’A’; --outer)
{ for(inner=’A’; inner<=outer; inner++)
{
cout<<inner;
}
cout<<endl;
}
Q.10 void main()
{ int a=5, k;
k=a++
cout<<k;
}
What will be the output.
Q.11 Rewrite the following code fragment using switch case.
if(ch = = ‘E’)
Eastern++;
if (ch ==’W’)
Western++;
if(ch==’N’)
Northen++;
if(ch = = ‘S’)
Southern;
else
Unknown++;
Q.12 What do you mean by conditional operator?
Q.13 Write a program that implements the concept of nested loops?
Q.14 What do you mean by errors in program? Explain any two types of errors with
example.
Q.15 i) Convert 50.375 to binary equivalent
ii) find 2’s compliment of 01101
Q.16 Write a program to print given structure, for n lines, where n given by user:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Q.17 Write Predict the output of the following codes:
i) if (!0)
{
cout<<”Tricky\n”;
}
cout<< “Yes”;
ii) if (!3)
cout<< “Tricky again”;
else
cout<<”Am I right”;
cout<<”NO???”;
iii) if (!0)
cout<<”Third Time Tricky”;
cout<<”Am I right”;
iv) if (0)
cout<<”Fourth Time Again”;
cout<<”NO???”;
Q.18 What is Object oriented programming? Mention the basic concepts of oop and
write the two advantages of OOP.
Q.19 Compare object oriented programming withfunction oriented programming.
Q.20 Write a program to check whether a given number is palindrome or not. Do not
use predefined function.
Q.21 Write a program to print Fibonacci series upto n number, where n is given by user.
Q.22 Write a program to test a given number is prime or not?
………………..
Download