100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
C plus plus and MySQL Computer Science Sample Question Paper $5.49   Add to cart

Exam (elaborations)

C plus plus and MySQL Computer Science Sample Question Paper

 2 views  0 purchase
  • Course
  • Institution

This documents contains past year sample paper of c++ programming language with related outputs error correction questions etc, along with MYSQL .

Preview 2 out of 12  pages

  • November 4, 2021
  • 12
  • 2021/2022
  • Exam (elaborations)
  • Answers
avatar-seller
Class XII
Computer Science (083)
Sample Question Paper 2018-19

Time allowed: 3 Hours Max. Marks: 70

General Instructions:

(a) All questions are compulsory.
(b) Programming Language with C++
(c) In Question 2(b, d) ,3 and 4 has internal choices.


Q. No. Part Question Description Marks
1 (a) Write the type of C++ Operators (Arithmetic, Logical, and Relational (2)
Operators) from thefollowing:
(i) !(ii) !=(iii) &&(iv) %

(b) Observe the following program very carefully and write the name of those (1)
header file(s), which are essentially needed to compile and execute
thefollowing program successfully:
void main()
{
char text[20], newText[20];
gets(text);
strcpy(newText,text);
for(int i=0;i<strlen(text);i++)
if(text[i] = =’A’)
text[i] = text[i]+2;
puts(text);
}

(c) Rewrite the following C++ code after removing any/all Syntactical Error(s) (2)
with each correction underlined.

Note: Assume all required header files are already being included in the
program.

#define float PI 3.14
void main( )
{
float R=4.5,H=1.5;
A=2*PI*R*H + 2*PIpow(R,2);
cout<<‘Area=’<<A<<endl;
}



1

, (d) Find and write the output of the following C++ program code: (3)
Note: Assume all required header files are already being included in
the program.
void main( )
{
int Ar[ ] = { 6 , 3 , 8 , 10 , 4 , 6 , 7} ;
int *Ptr = Ar , I ;
cout<<++*Ptr++ << '@' ;
I = Ar[3] - Ar[2] ;
cout<<++*(Ptr+I)<<'@'<<"\n" ;
cout<<++I + *Ptr++ << '@' ;
cout<<*Ptr++ <<'@'<< '\n' ;
for( ; I >=0 ; I -=2)
cout<<Ar[I] << '@' ;
}

(e) Find and write the output of the following C++ program code: (2)
typedef char STRING[80];
void MIXNOW(STRING S)
{
int Size=strlen(S);
for(int I=0;I<Size;I+=2)
{
char WS=S[I];
S[I]=S[I+1];
S[I+1]=WS;
}
for (I=1;I<Size;I+=2)
if (S[I]>=’M’ && S[I]<=’U’)
S[I]=’@’;
}
void main()
{
STRING Word=”CBSEEXAM2019”;
MIXNOW(Word);
cout<<Word<<endl;
}

(f) Observe the following program and find out, which output(s) out of (i) to (2)
(iv) willbe expected from the program? What will be the minimum and the
maximum value assigned to the variable Alter?

Note: Assume all required header files are already being included in the
program.
void main( )
{
randomize();
int Ar[]={10,7}, N;

2

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Stevendurby. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79271 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.49
  • (0)
  Add to cart