KENDRIYA VIDYALAYA SANGATHAN JAIPUR REGION

SESSION ENDING EXAMINATION 2016-17 (Set 1)

Class – XI COMPUTER SCIENCE (083)

Time Allowed: 3 hours Maximum Marks: 70

**********************************************************************

Instruction (i) All questions are compulsory

(ii) Programming Language: C++

**************************************************************************

Q 1) Answer the following –

a) Explain the architecture diagram of a Computer? 2

b) Define – Hardware, software and firmware. 2

c) Convert the following :

(i) (2BE)16 = (?)8 1

(ii) Write the binary value of the message FACE? 1

d) Expand : i) PROM ii) ALU 2

e) How is Data different from Information? 1

f) What is the importance of Disk Defragmenter? 1

Q 2) Answer the following questions -

a) Write the difference between literals and constant variables. 2

b) Write output for following code : 2

int x=10, y=20;

cin z;

cout (++x + y- -) - z ;

i)  If the input is 10.

ii)  If the input is -5.

c) Name the header files to which the following belong: 2

(i) pow ( ) (ii) strcmp( ) (iii) isalpha( ) (iv) getch( )

d) What is the purpose of setw operator? 1

e) Name the primitive data types in C++. Explain any two. 2

f) Give an example of defining a reference variable in C++. 1

Q 3) Answer the questions below -

a) Write the equivalent C++ expression: p = a(b + c) / 2c 1

b) Explain the difference between (= =) operator and (=)operator with example? 2

c) Find the output value of z if x=10 and y=20. 2

i) z = x > y ? 25 : 70 ;

ii) z = x >=10 & y<50 ? 100 : 150 ;

d) Explain the purpose of #define. 2

Q 4) Attempt the following questions –

a) Define – Guard Code and Robustness. 2

b) Write the difference between compile time error and run time error? 2

c) Explain the steps of problem solving methodology? 3

d) What is the purpose of comments? How can you insert comments in C++? 2

e) Write any four characteristics of a good program? 2

f) Design a flowchart to find sum of two integers. 1

Q 5) Answer these –

a) Write a program in C++ to input an integer and print its reverse. 3

b) Differentiate the while loop and for loop with example? 2

c) Give the output of the following program segment: 1

(i) int m = 0 ; while (m <= 13){ cout m < ‘\t’; m += 7 ; }

d) Rewrite the following program after removing syntactical errors, underline each correction. 2

# include <iostream.h

void main( )

{ int r, k ;

cin r > s ;

b = 40 ;

if(r >b);

cout r - k

else

cout < k ; }

e) Write a program in C++ to input a number and check whether it is a prime number or composite number? 3

Q 6) Answer the following -

a) What do you mean by call by value and call by reference in function call? Give example of each. 3

b) Write a program to illustrate the working of function which receives parameter but does not return result? 3

c) Explain actual and formal parameters of a function by giving C++ example. 2

d) Compare and comment on the following three statements. 1

return ;

return void ;

return (void) ;

e) Write a program in C++ that increases the value of each elements of an integer array by 15. The array has ten elements. 3

For example if the array is initially 5 , 20 , 6, 8, 1, 40, 9, 2, 15, 30

Then the changed array will be 20, 35, 21, 23, 16, 55, 24, 30, 45

Q 7) Answer these questions -

a) Write C++ code to implement the following structure : 3

struct sales

{

int id;

char itemname[20] ;

double amount ;

};

Input the details of 5 items and display the total amount of the 5 items sold.

b) What is the basic difference between structure and class? 1

c) Define a function RowSum() in C++ that takes a two dimensional array of integers and its size as arguments and prints the sum of each row. 4

************************

KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION

Session Ending Examination 2016-17

Marking Scheme Set 1

Class – XI Computer Science

***************************************************************

Q.1[A] 1 mark for giving names of functional units (input/output/memory)

1 mark for explanation of the working of functional units.

[B] 2 marks for correct definition. Note –give 1 ½ marks if only two defined.

[C] i. 1 mark for correct answer.

ii. 1 mark for correct answer.

[D] 2 mark for any 2 correct abbreviation

[E] 1 mark for correct expansions

[F] 1 marks for correct answer.

***************************************************************

Q2.[A] 2 marks for any correct differences

[B] Output will be

i. 291

ii. 306

1 mark for each correct answer

[C] Name the header file for which the following belongs to :-

1. pow( ) – math.h

2. strcmp( ) – string.h

3. isalpha( ) – ctype.h

4. getch( ) – conio.h

1/2 Mark for each correct answer

[D] 1 mark for correct answer

[E] 1 mark for names of types. ½ mark each for explaining any two data types.

[F] 1 mark for correct answer

**************************************************************

Q 3[A] 1 Mark for each correct answer

[B]

‘==’ Operator / ‘=’ Operator
It is a comparison operator. / It is assignment operator.
For example, value= =5
It returns 1 if the comparison is true otherwise returns 0. / For example, value =5 It assigns 3 to value.

1 Mark for correct answer

1 Mark for example.

[C] 1 marks for each correct answer.

[D] 1 mark for definition (as a macro and as a symbolic constant). ½ mark for each example.

***************************************************************

Q.4 [A]. 2 mark for correct definition

[B]. 1 mark for compile time error and 1 mark for run time error.

[C]. 3 mark for mentioning correct Phases

[D]. Comments are non executable statement of a program which enhance the readability of a program. They help us to understand the working and functionality of program. Example of single line and multi-line comment. ( 1+ 1 marks)

[E]. 1/2 marks for each correct characteristic

[F]. 1 marks for correct answer

***************************************************************

Q.5[A]. 3 Mark for correct program

1/2 mark for including correct header file

1/2 mark declaring variable and input value

1 ½ marks for checking factorial

1/2 mark for output

[B]. 1Marks for correct differentiation and 1 mark for example of each

[C]. (i) 0 7

[D] Corrected code:

# include <iostream.h

void main( )

{ int r, k ;

cin > r > s ;

int b = 40 ;

if(r >b) __

cout < r – k ;

else

cout < k ; }

½ mark for each correction

[E]. 3 marks for writing correct program

(

½ mark for including correct header file

½ mark for declaring variables

½ mark for assigning values

1 mark for correct logic

½ mark for output

)

**************************************************************

Q.6 [A]. 1 ½ marks for call by value with example and 1 ½ marks for call by reference with example.

[B]. 3 marks for writing correct program:-

(

½ mark for including correct header files.

½ mark for declaring variables and function

½ mark for reading variable value

½ mark for function defination

½ mark for calculating

½ mark to print

)

[C]. 2 marks for correct answer:-

[D] 1Mark for correct answer.

[E] 3 Marks for correct program.

**************************************************************

Q.7 [A]3 marks for correct code. (Note – ignore including header files)

[B] 1 mark for correct difference

[C] 4 marks for writing correct function code:-

( ½ mark for correct header function header

2 marks for correct logic using nested loops

½ mark for output statement)

************************

Page 5 of 6