Home » Science » Computer Science » Sample Paper of Computer Science 2014 for class 11, CBSE. Paper No.1

Sample Paper of Computer Science 2014 for class 11, CBSE. Paper No.1

  
        
          

Sample Paper – 2014
Class – XI
Subject –
Computer Science

 

 

Time Allowed: 3 Hours                                                                                             Maximum Marks: 70

 

Instructions:

(i) All questions are compulsory.

(ii) Programming language: C++

 

 

1.(i) (1010.11)2     = (___)8                                                                                                                [ 1 ]

(ii) (6AF)16               = (___)2                                                                                                                [ 1 ]

(iii) (10111)2       = (___)10                                                                                                                             [ 1 ]

 

  1. Answer the following questions.             [ 1 X 5 ]

(a) What is the purpose of comments and indentation in a program ?

(b) What do you mean by cascading of I/O operators?

(c) What are the predefined stream objects in I/O Library ?

(d) The modulus operator works only with integers – True or False.

(e) What do you mean by runtime error and logical errors ?

3.(i) Name the header files to which following built – in function belongs to.                                  [ 1 X 5 ]

(a) seekg( ), (b) setw( ), (c) fscanf( ), (d) strlen( ), (e) toupper( )

(ii) What will be the maximum and minimum expected outputs of the following program segments?

void main( )                                                                                                                                         [ 2 ]

{

int gn=10,fn;

fn = random(gn)+11;

cout<<fn;

}

 

  1. (i) What do you mean by robustness ? [ 1 ]

(ii) What are base and derived class ? How are these two interrelated ?                              [ 1 ]

(iii) Explain about enum and typedef with example.                                                              [ 1 ]

(iv) Explain briefly the concept of time sharing.                                                                         [ 1 ]

(v) What is a shortcut menu? What is its significance ?                                                           [ 1 ]

 

5.(a) Write about the different types of printer ?                                                                         [ 2 ]

(b) What is the difference between RAM and ROM ?                                                               [ 2 ]

(c) What is the function of memory ? What are its measuring units ?                                                [ 2 ]

(d) Mention the steps you would follow while writing a program ?                                         [ 2 ]

(e) What are the characteristics of a good program ?                                                                [ 2 ]

 

  1. What will be the output of the following program.                         [ 3 X 5]

(a) void result(int &x, int y=10)                                                                                                                      

{

int temp = x + y;

x + = temp;

if(y <=10)

y + = temp;

}

void main( )

{

int A1=10, B2=5;

result(A1, B2);

cout<<A1<<B2<<endl;

result(A1);

cout<<A1<<B2<<endl;

result(B2);

cout<<A1<<B2<<endl;

}

 

(b) What will be the output of the following program segment.

#include <iostream.h>

void main( )

{ int i = 0, x = 0;

do

{ if(i % 5 = = 0)

    { cout<<x;

       x++;

    }

  ++ i;

}while(i<10);

cout<<”\n”<<x;

}

 

(c) What will be the output of the following program segment.

void withdef(int hisnum = 30)                                                                                                            

{

for(int i=20 ; i<=hisnum ; i+=3)

cout<<i<<” “;

cout<<endl;

}

void control(int &mynum)

{

mynum + = 5;

withdef(mynum);

}

void main( )

{

int yournum = 10;

control(yournum);

withdef( );

control(yournum);

}

(d)Write the output of the following program.

#include <iostream.h>

void main()

{ int x = 5;

if(x++ = = 5)

cout<<”five”<<endl;

else

if(++x = = 6)

cout<<”Six”<<endl;

}

(e)What will be the output of the following segment ?

struct number

{

int no1, no2;

};

void display(number n)

{

cout<<”Number1=”<<n.no1++<<”Number2=”<< – -n.no2<<endl;

}

void main( )

{

number n1={10,100}, n2, n3;

n3 = n1;

n1.no1 + = 5;

n2 = n3;

n2.no1 – = 5;

n2.no2 * = 2;

n3.no1 + = 1;

display(n1);

display(n2);

display(n3);

}

  1. Correct the errors, if any, and underline it in the following program. [2 X 3]

(a)

structure

   {

   char name[20];

   char destination[10];

   };

void main()

{

employ e={27,”PGT”};

cout<<employ.name;

cout<<destination;

}

(b) #include <iostream.h>

void main( )

{ int x[5], y, z[5];

for(i= 0; i<5; i++)

{ x[i]=i;

z[i]=i+3;

y=z;

x=y;

}

}

(c) Rewrite the following by correcting the syntax errors.(Underline each correction)

include <iostream.h>

void main( )

{

int sum; value;

for(i=0; i<=10; i++)

cin>>value;

sum = + value;

}

8.(a) Write the output for the following program code fragment.                                             [ 1 ]

for(i= -3, sum=0; i<11; i++) sum++;

cout<<sum;

(b) Declare a structure student with following members.                                                         [ 1 ]

an integer member called roll, a floating member called marks and a character member

called grade.

(c) How many times the following loop will execute and what will be the output.               [ 2 ]

int a=1;

while(++a<=10)

                    cout<<a++<<”\t”;

 

  1. (a) Write a C++ program that invokes a function calc( ) which takes two integers and an arithmetic operator and prints the corresponding result.                                                 [ 2 ]

(b) Write a program to check a number whether it is prime or not.                                          [ 2 ]

(c) Write a function sumfun( ) to find the sum of following series. The function should accept two arguments long n and int x and return a double type result.                                                       [ 3 ]

1 + x/2! + x2/3! + x3/4! + . . . . . . . . .+ xn/(n+1)! 

(d) Write a program using function to display the multiplication values of column elements of a two-dimensional array R[7][7] containing integers.                                                                           [ 2 ]

(e) Write a program to accept the name and total marks of 10 students to an array of structure. Display the names of the student securing highest and lowest mark.                                     [ 3 ]

(f) Write a function to arrange all the elements in descending order which are present in 1st row and last row of a matrix of order m X n.                                                                                                            [ 3 ]

 

 

 

PAPER SUBMITTED BY:       

 

Name:            PRADIP KUMAR MOHANTY

Email:            pradipkmohanty@rediffmail.com

Phone No.    09437289939

About

The main objective of this website is to provide quality study material to all students (from 1st to 12th class of any board) irrespective of their background as our motto is “Education for Everyone”. It is also a very good platform for teachers who want to share their valuable knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *