Page 18 - C++
P. 18
MARKING SCHEME
Subject: Computer Science
Class: XII (2017-18)
Time: 3 Hrs. M.M.:70
Instructions:
(a) All questions are compulsory,
(b) Answer either Section A or Section B:
(i) Section A - Programming Language with C++
(ii) Section B - Programming Language with Python
(c) Section C is compulsory.
SECTION – A (C++)
Q. Part Question Description Marks
No.
Q1. (a) What is the role of a parameter/argument passed in a function? Can a default value be 2
assigned to a parameter(Yes/No)? If yes, justify your answer with the help of a suitable
example otherwise give reason.
Ans Parameters/arguments are values passed in the function for the attributes which are
required by the function to work and provide desired output.
Yes, an argument may be assigned a default value.
E.g.
int Sum(int a, int b=10) //Here b is given a default value of 10
{ return (a+b); }
void main()
{
int x=5;
- cout<<Sum(x);
}
Output: 15
(1 mark for correct role of parameter)
(1/2 mark for correct answer)
(1/2 mark for giving correct example)
(b) Raman suggests Kishan the following header files which are required to be included in 1
Page No. 1