CS 1
CS 1
CS 1
Subject-Computer science –I
CLASS-XII
Time: 3:00 Hr Marks: 50 M
_________________________________________________________________________________
Q.1. A) Select the correct alternative and rewrite the following: 4M
1) _______ symbol is used to declare destructor function in C++.
a) @ b) # c) ~ d) !
2) ________ operator cannot be overloaded.
a) ++ b) + c) :: d) >>
3) _______ tag is used to write the definition list.
a) <UL> b) <DL> c) <OL> d) <DT>
4) ________ is collection of fields .
a) File b) Record c) Array d) Queue
1) What is constructor and destructor? Explain each with the help of suitable example.
1) Write a C++ program to accept 10 integers in array and find its sum and average.
2) Write a C++ function to find surface area of a sphere. (Hint- Surface area of sphere =
A= )
OR
Q.5. Answer any TWO of the following: 10M
1) Write a C++ program to accept a sentence of characters and count number of words
in a sentence.
2) Write a class based C++ program to accept two integers and find its G.C.D. (Greatest
Common Factors).
3) Write text exact output of the following HTML code with font specification.
(Note: here code is given for which output is required along with link details as
mentioned)
<HTML>
<BODY
<TABLE border= "3" Cellspacing="10">
<TR>
<TH colspan = "3" > STREAM </TH>
</TR>
<TR>
<TD> <A href= "Science.html"> SCIENCE </A> </TD>
<TD> <A href= "Commerce.html"> COMMERCE </A> </TD>
<TD> <A href= "Arts.html"> ARTS </A> </TD>
</TR>
</TABLE>
</BODY></HTML>