Professional Documents
Culture Documents
(330)
Time : 3 Hours] [Maximum Marks : 60
(ii) Marks allotted to each question are given in the right-hand margin.
b) Sorting
d) 'Iaskbar
ii) Scanner
iii) Mouse
s6/ossfl-330-AI G-73 2 I lllil llill lltl ll llil ilil illl illl il lfl lllil ffil lllil ilil llilill lllll r c.n,d
3. a) Name the header files to.which following built-in function belong :
1,2x1-2il
i) fabs 0
ii) strcat 0
b) Explain the following terms with example from C++. 12x2=41
i) Abstraction
ii) encapsulation
b) Find the syntax effor from the following program. Justify each crror. l2l
#include<iostream.h>
void display(float p)
void main( )
float g= 11.1;
display(p);
#include<iostream.h>
int p=4;
{
ililrilt lllilutililllilt ffi I illt H
v=v*n;
n=v--14;
void main0
change(::p,q);
changc(p);
changc(q, 10);
cout<< : p<<"####"<<q<<endl
: ;
{
char toy_typellOl;
protected:
float price;
void cal_price(float);
public:
Toys( );
char choice;
void toyinput 0;
void toyshow0;
);
class MyToys : protected Toys
{
char mtoy_name[10];
float weight;
protected:
int no_wheels;
public:
void Mylnput 0;
);
i) Which type of inheritance is shown in the above example?
ii) Which all data members are accessible from Mylnput( )?
iii) Name the member functions which are accessible from the objcct of
class MyToys.
d) Write a program to find all numbers which are perfect square in an intcgcr.
affay of size 15. I3l
Write a C++ statement to accept the value of Locality from the uscr. 12il
{
s6/ossrt-330-Al G-78 z llllillffillillilililllilillllllllilillillfllffiilillllfllllillilllll rcontd
,gin>>P'a*ieat;Id;
gets(Patient-name);
gets (OPD-Date);
cin>>fees;
gets(Dept);
void showdataO'
cout<<Patient-Id<<Patient-Name<<OPD-Date<< fecs<<I)cpt;
char []gctdeptQ
t
return Dept;
t
return Name;
);
e) Explain the two methods to open a data file in C++. I3l
ooo
To score better in nios and for good
percentage contact @ 9839065533 ,6386869080