CBSE Sample Paper | Class XI | Computer Science | CBSE | 2006

CBSE Sample Paper

  Sample paper-computer science

 

 

Class-XI

 

SUBJECT: COMPUTER SCIENCE                                                       DURATION:3Hrs

CLASS:XI                                                                                                MAX.MARKS:70

 

NOTE:

*Programming language C++

 

 

1.

1. Compare Fourth and fifth generation computers.                                                      (2)

2. What does booting of the system mean?                                                                    (2)

3.  Name the header files of the following built in functions belongs to                       (1)

i) getchar()

ii) rand()

4. What will be the value of k for the following expression?                                         (1)

k=j+2*J+(m=j,m++);if k=20 initially

5. What are the functions of the operating system?                                                         (2)

6. Why C++ is called object oriented language?                                                             (2)

7. Define hard ware, soft ware, firm ware and live ware.                                                (2)

8. Difference between implicit and explicit conversion.                                                  (2)

9. Define degradation and robustness.                                                                              (2)

10. How is file name is different from path name. Support your answer with examples. (2)

11. What is a source code.                                                                                                  (1)

12. Rewrite the following program after removing the syntactical errors(if any).

Under line each correction.

(Assume all header files are declared)

i)

#include<iostrem.h>                                                                                                         (2)

#include<conio.h>

void main()

{

int c;

if(int x ==0)

{

float y;

cin>>y;

switch(y);

{

case 1:

cout<<’One’;

break;

}

cout<<x;

}

cout<<y;

}

ii)

#include<iostream.h>                                                                                                      (2)

#include<conio.h>

void main()

{

int x;

int y=x;

x=10;

cout<<y;

}

iii)                                                                                                                                      (2)

#include<iostream.h>

void main()

{

void calc(int a,int &);

float x=10,y=20;

y=calc(x,20);

cout<<x<<y;

calc(10,&y);

}

void calc(int a,int &b);

{

int s=a*b;

cout<<s;

}

13. What will be the output of the following program.

(Assume all the header files are declared)

i)

void main()                                                                                                                     (3)

{

char x[]=”fUncTioNs”;

int i=0;

while(x[i]!=’\0’)

{

if(i%2==1)

x[i]=x[i]++;

else x[i]=’@’;

i++;

}

put(x);

}

 

ii)                                                                                                                                  (3)

int sum(int arr[],int size);

int main()

{

int val[]={1,3,5,7,9,11,13,15,17,19};

int s1=0;s2=0;

s1=sum(val,10);

s2=sum(val+4,6);

cout<<”s1=”<<s1<<endl;

cout<<”s2=”<<s1<<endl;

return 0;

}

int sum(int arr[],int size)

{

for(int i=0,s=0;i<size;++i)

s+=arr[i];

return s;

}

iii)                                                                                                                                  (3)

void main()

{

int x[]={2,4,6,8,10};

int k=0;k>=0;k–;j++)

{

x[k]=x[k]+j-1;

cout<<x[k]<<’ ‘;

}

}

 

14.

a. Write a menu driven program with the following choices.                                    (4)

1. To convert a positive number to its equivalent binary code.

2. To convert a binary code to its equivalent decimal.

3. Exit.

repeat the program according to user input(use do-while loop).

 

b. Write a program to input square matrix and interchange rows to column and column to   rows.                                                                                                                           (4)

 

c. write a program to input a line of text and display the count the number of characters in lower case   and upper case, number of words, number of spaces, number of digits, and special characters.                                                                                                      (4)

 

d. write a program to input a set of strings and reverse each string and display.        (4)

e. write the program to calculate the sum of series.

1(X) + [( 2 )² /2!]X² + [(3)²/3!]X³+………+[(n)²/n!]/ X? .

 

f. Write a program  to generate   a pattern .(Number of rows as per users input)      (4)

 

A

ABA

ABCBA

ABCDCBA

…………………

……………………

 

15.Convert the following.                                                                                         (5*1=5)

 

  1. Decimal  to binary

161,145

 

  1. Binary to decimal

11011100,10010101

 

c.  Hexadecimal to binary

7AB4,A07

 

  1. Binary to hexadecimal

1101011010111,1010110110111.

 

  1. Octal to binary

3576,2727

 

  1. Binary to octal

11001,111010111

 

 

16.Represent the Number 63.362(8-bits)                                                                         (3)

 

1.Sign and magnitude

2.One’s compliment

3.two’s compliment

 

17.What floating point does 0100101000.010101 represent?                                          (2)

 

END

 

 

 

 

 

Leave a Comment