You are on page 1of 6

Downloaded from www.studiestoday.

com

CLASS – XI M.M.: 70
TIME : 03.00 HRS
SUBJECT: COMP.SC.(083)
General Instructions:
a) All questions are compulsory.
b) Programming Language : C++

1. a. What is the difference between a digital and analog computer? 2


b. What is the difference between Data & Information? 1
c. Name any two Utility software. Write its uses also. 2
d. Evaluate following- (372) 8 = ( …………)10 1
e. Describe the functional diagram of computer. 2
f. What is the difference between compiler and interpreter? 2
2. a. What do you understand by a variable? How it is declared and 2
initialized?
b. Distinguish between a unary, a binary and a ternary operator. Give 3
examples for each one of them.
c. Calculate how many bytes used in the following : 2
(i) int sal[4][4];
(ii) char m[3];
d. What are data types? What are all predefined data types in C++? 2
e. Write corresponding C++ expression for following: 1

a2 + b2 + c2

f. Define : 2
i. Keyword
ii. Identifier
g. Which header files are required for the following? 2
(i) pow ( ) (ii) strcmp( )
(iii) isalpha( ) (iv) getch( )
3. a. What is the role of comment and indentation in a program? Explain 3
with suitable examples.
b. What is the difference between syntax error and a semantic error? 2
c. What do you understand by program maintenance? Explain its types. 3
d. What is robustness? 1
e. What are the stages of program development process? Explain each. 3
4. a. What is ‘void’? 1
b. Give the possible outputs of the following program segment: 1
int N= random(3);
cout<<N;

c. Differentiate Global Variable and Local Variable. 1


d. Write a C++ program to input three integer numbers and print the 3

Downloaded from www.studiestoday.com


Downloaded from www.studiestoday.com

largest.
e. What is source code? 1
f. What output will be the following code fragment produce? 2

void main( )
{
int val, res, n=1000;
cin>>val;
res = n+val>1750 ? 400 : 200;
cout<<res;
}
(i) if val=2000 (ii) if val=500

5. a. Rewrite the following code fragment using ‘switch – case’: 2

if ( ch = = ‘E’)
east + + ;
if ( ch = = ‘W’)
west + +;
if ( ch = = ‘N’)
north + +;
if ( ch = = ‘S’)
south + +;
else
unknown + +;

b. Write a C++ program to print day of the week corresponding to the 3


number (1-7) entered using ‘switch case’ statement.
Eg if number entered is 2, then print “Tuesday”
c. Identify the possible error(s) in the following code fragments and 2
correct the code :
void main
{
int a= 10;
cout>>” Enter value” ;
cin<<b;
c= a+b;
print c;
}
6. a. What is the difference between ‘while loop’ and ‘do-while loop’? 2
Explain with examples.

b. How many times the following loop executes? 2


(i) int p=10;
p = p+5;
while (p<=60)
{ cout<<p;
p=p+13;
}

Downloaded from www.studiestoday.com


Downloaded from www.studiestoday.com

(ii) Rewrite the following code using for loop


int i=0,z =15;
z = z-2;
while (i<=35)
{ cout<<++ i;
i=i+5;
}
c. What are jump statements in C++ ? Explain with example? 2
d. What is‘ #define’?Explain with an example. 2
7. a. Write a program to calculate and return the simple interest using 4
function. Values of Principal, Rate and Time should be passed as
parameter to the function.
b. What is an array? How it is different from structure? 2
c. Write a program of structure as following criteria: 4
struct student
{
int rollno;
char name[20];
double marks1;
double marks2;
};
Input the details of 5 student and display the total marks of each
student.

Downloaded from www.studiestoday.com


Downloaded from www.studiestoday.com
MARKING SCHEME
(SET-6)
CLASS: XI TIME: 3 hrs
SUBJECT: Computer Science (083) MAX. MARKS: 70

Q1 a) Digital computer : works on computation 2


Analog computer: works on measurement (1 mark for each correct diff)

b) Data: raw facts and figure 1


Information : data after processing becomes information(1 mark for correct
difference)
c) Utility Backup, compression, Disk Defragmenter, Antivirus 2
1 mark for writing two names, 1 mark for their uses
d) (372) 8 = ( 250)10 1
1 mark for correct answer
e) 1 mark for diagram and 1 mark for writing proper names of units 2
Input Unit, Output Unit, CPU-ALU-CU, Memory Unit
f) compiler translate HLL to MLL in one go 2
interpreter translate HLL to MLL line by line

Q2 a) Variable: named memory location which can hold a value of particular data type 2
Declare : data-type varname; e.g. int sal;
Initialized : first value assigned to a variable. e.g. int a=20;
1 mark for each part
b) Unary : Single operand, a++ 3
Binary : Two Operand, a+b
Ternary : three Operand, conditional operator
1 mark for each operator with example
c) 32, 3 ( 1 mark for each correct answer) 2
d) data types are the means to identify the type of data 2
i)fundamental data type ii) derived data type
( 1 mark for definition and 1 for its types)
e) Sqrt(a*a +b* b +c* c) 1 mark for correct answer 1
f) 1 mark for each correct answer 2
g) (i) math.h (ii) string.h (iii) ctype.h (iv) conio.h 2
½ mark for each

Q3 a) 1 mark for each definition 3


½ mark each for example
b) 1 mark for each type 2
c) 1 mark for definition 3
2 mark for explaining types
d) 1 mark for correct definition. 1
e) stages of program development process. 3
i) crack the problem
ii) code the algorithm

Downloaded from www.studiestoday.com


Downloaded from www.studiestoday.com
iii) compile the program
iv) execute the program

Q4 a) 1 mark for correct answer 1


b) 0 or 1 or 2 1
1 mark for correct answer
c) ½ mark for each definition. 1
d) 1 mark for input and output statements 3
2 mark for correct logic
e) 1 mark for correct answer 1
f) (i) 400 (ii) 200 2
1 mark for each correct answer

Q5 a) Rewrite the following code fragment using switch – case : 2


switch(ch)
{
case ‘E’ : east + + ;
break;
case ‘W’ : west + +;
break;
case ‘N’ : north + + ;
break;
case ‘S’ : south + + ;
break;
default: unknown + +;
}
b) 1 mark for input and output statements 3
2 mark for correct logic
c) Identify the possible error(s) in the following code fragments and correct the code : 2
void main( )
{
int a= 10;
cout<<” Enter value” ;
cin>>b;

c= a+b;
cout<< c;
}

Q.6 a) 1 mark for difference 2


½ mark for each example

b) (i) 4 times (1 mark) 2


(ii) 1 mark for correct conversion
1 mark for each correct answer
c) jump statements : used to skip or jumps over the statements 2
break, continue, goto

Downloaded from www.studiestoday.com


Downloaded from www.studiestoday.com
d) #define : allows to define symbolic names and constants 2
e.g. #define PI 3.14

2 marks for minimum two correct difference for each

Q.7 a) 1 mark for correct input & output statements 4


1marks for calling statement
1 mark for function header in definition
1 mark for correct formula for calculation
b) 1 mark for each definition 2
c) 1 mark for correct input & output statements 4
2 marks for reading values for structure members for 5 students
1 mark for correct for calculation

Downloaded from www.studiestoday.com

You might also like