Professional Documents
Culture Documents
SET [A]
COMPUTER SCIENCE
(3'30) ~I
Signature of Invigilators 1. _
2._' __
General Instructions :
1 Candidate must write hislher Roll Number on the first page of the Question Paper.
2 Please check the Question Paper to verify that the total pages and total number of questions
contained in the Question Paper are the same as those printed on the top of the first
page. Also check to see that the questions are in sequential order.
3 Making any identification mark in the Answer-Book or writing Roll Number anywhere
other than the specified places will lead to disqualification of the candidate.
4 Write your Question Paper Code No. 57IESS/4, Set-[A] on the Answer-Book. ~I
57IESS/4-330-A] 1 IIIIIIIII~III~III~III~III~IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII [C 0ntd ...
COMPUTER SCIENCE
(330)
(ii) Marks allotted to each question are, given in the right-hand side.
k=--values[3];
j=values[4]140;
cout«k--«"** "«j«"** "«++m«"**"«values[--j];
}
\n,\a
void main ( )
cout«x+l;
int z=y++;
cout«y»z;
Y(iv) Exit
S7IESS/4-330-A] 4 IIIIIIIIII~
Illi 111111111111111111111 illllllllllll~llmlllllllllllllllll [C 0ntd ...
(e) Predict the output of the following code
#include<io:itream. h>
~I·
iii'
3
void main 0-
--
int p=lQ_I- q=5;
int r=m.Lxnmat ch (q) ;
cout«p«"###" «q«"###"«r«endl;
r=mixnmatch(p,q);
cout«p~<"###" «q«"###"«r«endl;
r=mixnmatch(p,6);
cout«p«"###" «q«"###"«r«endl;
char type[50);
protected
float fprice;
public
void indata();
void outdata();
};
long Tcode;
protected:
float price [5);
intqty;
public
void enter ( )i
void show ( );
};
int Ano;
char name[20] ;
char subj ect [10] ;
int score;
public:
void Accept;(
{cin»Ano»score;gets(name); gets(subject);}
void Display ( )
{cout«Ano«name«subject«score;}
char * Rsub( ) {return subj ect; }
};
Write function in C++ to read contents from Class_Result.dat and display the
details of only those students whose subject is Social_Science.
(e) Differentiate between ios::nocreate and ios:noreplace. Write the 1+1=2
C++ statement to move the get pointer to the beginning of the file. Assume
the name of ifstream object as F. ~I!!
iii"
571ESS/4-330-A] 7 IIIIIIIIIIIIIIIIIIIIIIIIIIII~ 1111111~lllllllllllnllllllll
Lf)