Sei sulla pagina 1di 12

KENDRIYA VIDYALAYA SARNI BHOPAL REGION

HALF YEARLY EXAMINATION 2014-15


CLASS XI
COMPUTER SCIENCE

BLUE PRINT
Short
Answer
Question
(SA)
Type 1
2 marks
1
2
1

Short
Answer
Question
(SA)
Type 1
3 marks
1
1
1

Long
Answer
Question
(LA)
4 marks

Total

UNIT 1
UNIT 2
UNIT 3

Very
short
Answer
Question
(VSA)
1 mark
1
3
1

1
1
1

10
14
10

UNIT 4

36

Total

13

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:
o All questions are compulsory.
o Programming language used c++.
o Question 2 to 14 carry 2 marks
o Question 15 to 19 carry 3 marks
o Question 20 to 24carry 4 marks
Q.1
a)
b)
b)
d)

e)
f)
g)
h)
i)

Every question carry 1 mark


What is difference between cold booting and hot booting
What is token in c++ code?
What is difference between source code and executable
code?
Int x=8;
Void main()
{
Int x=6;
X*=::x;
Cout<<::x;
What will be the output?
List the memory measuring units in descending order
What is the role of header files?
How many value a function can return?
What is jump statement? Name any two
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)

{
Cout<<mes[l1-1]<<endl;
L1--;
}else
{
Cout<<mes3[l3-1];
L3--;
}
Q.1 Write an program to read 10 integer values for an array and
0
find largest and smallest value in array.
Q.1 Write a program to count number of digit, alphabets and
1
special characters in a string given by user.
Q.1 Rewrite the code using switch case:
2
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.1 Write a program to print given structure, for n lines, where
3
n given by user:
*
**
***
****
******
Q.1 Write a function sum () to calculate the sum of given series.
4
Where long n and int x passed as parameter
1-x2/2+x3/3 x4/4!+xn/N
Q.1 Give the time period and basic processing techinques for
5
any three generations of computer
Q.1 Write a program to swap two variable without using third
6
variable.

Q.1 What do you mean by errors in program? Explain any two


7
type of errors with example.
Q.1 Write a function SORT()to rearrange the elements of an
8
array in ascending order where array and its size passed as
parameter
Q.1 What is function ?what is the role of default argument in
9
function ? give example

Q.2 i) Convert 50.375 to binary equivalent


0
ii) find 2s compliment of 01101
Q.2 i) what is typedef? Give example
1
ii) void main()
{ int a=5, k;
K=a++ +a + ++a;
Cout<<k;
}
What will be the output.
Q.2 Give the brief Explanation of the different stages of
2
program development
Q.2 Write a program to check whether a given string is
3
palindrome or not. Do not use predefined function
Q.2 Write a program that invokes a function calc() which takes
4
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.
Questi
on
numb
er
Q.1 i)

Answer

Marks

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 1


token

iii)

Program written in HLL known as source


code after compilation linking and loading
it is converted to executable code

iv)
v)

8
Tb>pb>nb>gb>mb>kb>byte>nibble>bit

1
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

vii)

One

viii)

To skip the normal flow of program

(1/2 +1/2)

execution we can use jump function .Go to,


exit(), Continue, Break
ix)

Q.2

1.
2.
3.
4.
CISC
1.
2.

It is fixed size
Homogenous value set
Compile time memory allocation

(1/2 +1/2)

for each

Simplification of compilation
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
Q.3

#include<iostream.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

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


process.h
ETly
hML
iTS
L

1/2 for one

Q.9

Q.10

iv)

# 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++)

for
declaration
and reading
value
1 for logic
for result
display

if(values[i]<small)
small=values[i];
}

}
cout<< "The biggest number is " << big
<<endl;
cout<< "The smallest number is " << small
<<endl; }
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 :<<aplh<<endl;
Cout<<Number of digits in string
is :<<num<<endl;
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;
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++)
Cout<<endl;
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;;
}
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)

# include<iostream.h>
# include <conio.h>
Void main ()
{
Inta,b;
Cout<< Enter two values to swap:;

for
headerfile
for
variable
declatration
and

Q.15

Q.16

1+1+1

cin>>a>>b;
A=a+b;
b=a-b;
a=a-b;
Cout<<\nvalues after swapping
are\n<<a<<b;
Getch();}

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 doesnt 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) Is 10010
2s 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)
ii)

1+1
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

Q.24

for main for function call, 1/2 for


prototype 1 1/2 for function body 1 for
output

..

Potrebbero piacerti anche