KENDRIYA VIDYALAYA SARNI BHOPAL REGION

HALF YEARLY EXAMINATION 2014-15

CLASS XI

COMPUTER SCIENCE

…………………………………………………………………………………………………………………………………………

BLUE PRINT

Very short Answer
Question
(VSA)
1 mark / Short Answer
Question
(SA)
Type 1
2 marks / Short Answer
Question
(SA)
Type 1
3 marks / Long Answer Question
(LA)
4 marks / Total
UNIT 1 / 1 / 1 / 1 / 1 / 10
UNIT 2 / 3 / 2 / 1 / 1 / 14
UNIT 3 / 1 / 1 / 1 / 1 / 10
UNIT 4 / 4 / 9 / 2 / 2 / 36
Total / 9 / 13 / 5 / 5

Total question:32

Total Marks : 70

KENDRIYA VIDYALAYA SARNI BHOPAL REGION

HALF YEARLY EXAMINATION 2014-15

CLASS XI

COMPUTER SCIENCE

Max Marks: 70 Time : 3 Hrs.

…………………………………………………………………………………………………………………………………………

Note:

All questions are compulsory.

Programming language used c++.

Question 2 to 14 carry 2 marks

Question 15 to 19 carry 3 marks

o  Question 20 to 24carry 4 marks

Q.1 / Every question carry 1 mark
a) / What is difference between cold booting and hot booting
b) / What is token in c++ code?
b) / What is difference between source code and executable code?
d) / Int x=8;
Void main()
{
Int x=6;
X*=::x;
Cout<::x;
What will be the output?
e) / List the memory measuring units in descending order
f) / What is the role of header files?
g) / How many value a function can return?
h) / What is jump statement? Name any two
i) / What is the basic characteristic of array.Any two
Q.2 / Differentiate between CISC and RISC.
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 / What do you mean by exit control loop? Give example.
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 diference between local and global variable
Q.7 / Write a program to print Fibonacci series upto n number, where n is given by user.
Q.8 / Name the header files for given functions:
i)  Islower()
ii)  Rand()
iii)  Frexp()
iv)  Exit()
v) 
Q.9 / What will be the output:
#include<iostream.h
#include<string.h
void main()
{
Charmes1[]=”SKy”, mes2[]=”ThE”;mes3[]=”LiMIT”;
Int l1=strlen(mes1);
Int l2=strlen(mes2);
Int l3=strlen(mes3);
Int n=l1+l2+l3;
For (int c=0;c<n;c++)
{ if c%4==0)
{cout<mes2[l2-1];
L2--;
}
Else
If (c%3==0)
{
Coutmes[l1-1]<endl;
L1--;
}else
{
Cout<mes3[l3-1];
L3--;
}
Q.10 / Write an program to read 10 integer values for an array and find largest and smallest value in array.
Q.11 / Write a program to count number of digit, alphabets and special characters in a string given by user.
Q.12 / Rewrite the code using switch case:
Char code;
Cin>code;
If (code==’A’)
Cout<”Accountant”;
Else
If (cofe==’C’ || code==’G’)
Cout<”Grade IV”;
Else
If (cout==’F’)
Cout<”Financial Advisor”;
Q.13 / Write a program to print given structure, for n lines, where n given by user:
*
**
***
****
******
Q.14 / Write a function sum () to calculate the sum of given series. Where long n and int x passed as parameter
1-x2/2+x3/3 – x4/4!+……xn/N
Q.15 / Give the time period and basic processing techinques for any three generations of computer
Q.16 / Write a program to swap two variable without using third variable.
Q.17 / What do you mean by errors in program? Explain any two type of errors with example.
Q.18 / Write a function SORT()to rearrange the elements of an array in ascending order where array and its size passed as parameter
Q.19 / What is function ?what is the role of default argument in function ? give example
Q.20 / i) Convert 50.375 to binary equivalent
ii) find 2’s compliment of 01101
Q.21 / i) what is typedef? Give example
ii) void main()
{ int a=5, k;
K=a++ +a + ++a;
Cout<k;
}
What will be the output.
Q.22 / Give the brief Explanation of the different stages of program development
Q.23 / Write a program to check whether a given string is palindrome or not. Do not use predefined function
Q.24 / Write a program that invokes a function calc() which takes two integers and an arithmetic operator and return the corresponding result.

………………..

KENDRIYA VIDYALAYA No2 KOTA

AGRA REGION

HALF YEARLY EXAMINATION 2013-14

CLASS XI

COMPUTER SCIENCE

…………………………………………………………………………………………………………………………………………

MARKING SCHEME

NOTE: There may be several methods of solving a problem as well as explanation of questions. So evaluation of answer scripts should be accordingly.

Question
number / Answer / Marks
Q.1 i) / When PC is powered on its known as cold boot and when it is restarted its known as hot boot / (1/2 +1/2)
ii) / Smallest unit of any statement is known as token / 1
iii) / Program written in HLL known as source code after compilation linking and loading it is converted to executable code / 1
iv) / 8 / 1
v) / Tb>pbnbgbmb>kb>byte>nibble>bit / 1
vi) / Header file is a combination of pre-defined functions and after including header file it allow us to use function contained in that file / 1
vii) / One / 1
viii) / To skip the normal flow of program execution we can use jump function .Go to, exit(), Continue, Break / (1/2 +1/2)
ix) / 1.  It is fixed size
2.  Homogenous value set
3.  Compile time memory allocation
4.  / (1/2 +1/2)
Q.2 / CISC
1.  Simplification of compilation
2.  Generate sequence of machine instructions
3.  Provides a single machine instruction for each statement in HLL
4.  It incorporates variable length instruction fomat
RISC
1.Relatively few instruction
2.Memory Access limited to load and store instructions
3. All operation done within the registers of the CPU
4. Fixed length, easily decoded instruction format / ½ for each
Q.3 / #includeiostream.h
int main()
{
Intx,y;
Cin>x;
For(y=1;y<x;y++)
Cout<x*y;
Return 0;
} / (1/2 for one correction)
Q.4 / Exit control loop mean in such loop entry is not controlled by condition check but exit is condition driven. Example:Do-While / 1+1
Q.5 / String.h, ctype.h / 2
Q.6 / I) local is declared within a block and global declared out of all block
ii) local is accessible within block only where it is declare but globle is accessible in every block / 1+1
Q.7 / #include <iostream.h
#include <conio.h
Void main ()
{
Intn,first=0,second=1,third=0;
Cout<” enter number up to you want print series”;
Cin>n;
Cout<first<endl<second;
For(int i=1; third<=n;i++)
{third=first+second;
Cout<third<endl;
First=second;
Second=third; }
Getch();
} / ½ for headrfiles and main ½ for vardeclation and initaliztion
1 for logic and output
Q.8 / i) ctype.h ii)math.h iii)math.h iv) process.h / 1/2 for one
Q.9 / ETly
hML
iTS
L / 2
Q.10 / # include<iostream.h
# include <conio.h
int main (){
int values[ 10 ]; intsmall,big; big=small=values[0];
for ( int i = 0; i < 10; i++ ) {
cout< "Enter value " < i < ": ";
cin> values[i];
}
for (int i = 0; i < 10; i++) {
if(values[i]>big) {
big=values[i];
}
}
for (int i = 0; i < 10; i++) {
if(values[i]<small) {
small=values[i];
}
}
cout< "The biggest number is " < big <endl;
cout< "The smallest number is " < small <endl; } / ½ for declaration and reading value
1 for logic
½ for result display
Q.11 / # include<iostream.h
# include <conio.h
Void main ()
{
Char str[80];
Intalph, num,spcial;
vowel=conso=secial=0;
Cout< “enter string”;
Getline(str,80,”\n”);
If ((str>=65)||(str<=80)||(str>=91)||(str<=116))
Alph++;
Else
If ((str>=81)||(str<=90))
Num++
Else
Special++;
Cout<”Number of alphabet in string is :”<aplhendl;
Cout<”Number of digits in string is :”<numendl;
Cout<”Number of special character in string is :”<special<endl;
Getch();
} / ½ for headerfile
½ for variable declatration and initialization
½ for logic
½ for output
Q.12 / Char code;
Cin>code;
Switch(code)
{
Case:’A’
Cout<”Accountant”;
Break;
Case:=’C’ || ’G’
Cout<”Grade IV”;
Break;
Case:’F’
Cout<”Financial Advisor”;
Break; / 2
Q.13 / # include<iostream.h
# include <conio.h
Void main ()
{
Int n;
Cout<” Enter no of lines:”; cin>n
For (int i=1; i<=n;i++)
Coutendl;
For (int j=1; j<=i;j++)
Cout<”*”;
Getch();
} / ½ for headerfile
½ for variable declatration and initialization
1 for logic
Q.14 / Float sum(int n , int N)
{float sum=0,sign=+1,term=0;
Sum+=1;
Inti,j;
For(i=2; i<=N; i++)
{sign*=-1;
Term=(sign*pow(x,i))/I;
Sum+=term;
}
Return sum;;
} / 2
Q.15 / I generation (1940-56,Vaccume Tube))
II generation(1956-1963, Transistors)
III generation(1964-1971, ICS)
IV generation (1971-1980, VLSI Microprocesor)
V Generation (1980-to present, ULSI Microprocessor) / 1+1+1
Q.16 / # include<iostream.h
# include <conio.h
Void main ()
{
Inta,b;
Cout<” Enter two values to swap:”; cin>a>b;
A=a+b;
b=a-b;
a=a-b;
Cout<”\nvalues after swapping are\n”<a<b;
Getch();} / ½ for headerfile
½ for variable declatration and initialization
1 ½ for logic
½ for output
Q.17 / Error is bug in source code. Semantic error, syntax error, logic arror , type error(explanation of any two) / 1+1+1
Q.18 / Void sort(intarr[], int size)
Int t;{
for (int 1=0; i<size;i++)
For(int j=0; j<size-I;j++)
If (arr[j]>a[j+1])
{
T=a[j];
A[j]=a[j+1];
A[j+1]=t;
}
Cout< “array in scending order”<endl;
For (i=0;i<size;i++)
Cout<a[i]<endl;
} / 1 for prototype
1 for logic
1 for output
Q.19 / Function is non-self-executable sub program intended to execute specific task. If default values are given for parmeters then if user doesn’t passes the values for parameters then default values can be used.
Void sampl (int a=5;b=10); / 1+1+1
Q.20 / i)50=110010
.375= .011
ii) I’s 10010
2’s 10011 / i)1+1
ii)1+1
Q.21 / i) Typedef is giving another name to existing datatype.
Typedefint a; now a will also work as int.
ii)12 / i)  1+1
ii)  2
Q.22 / Crack the problem
Design solution
Code the program
Compile the code
Execute the code
Testinig
Documentaion
Maintenance / 1 for two steps
1+1+1+1
Q.23 / 1 for variable declaration and read, 1 for reversing string, I for comparing strings, I for output / 4
Q.24 / ½ for main ½ for function call, 1/2 for prototype 1 1/2 for function body 1 for output / 4

………………..