CBSE eBooks
CBSE Guess > eBooks > Class XII > Computer Science By . Mr. MRK
Chapter – 1 C++ Revision Tour

2008 Outside Delhi:
1.b. Name the header files that shall be needed for the following
code: 1
void main( )
{
char word[]=”Exam”;
cout<<setw(20)<<word; }
Ans: iostream.h, iomanip.h
1.c. Rewrite the following program after removing the syntax
error(s) if any. Underline each correction. 2
#include
<iostream.h>
void main( )
{
One=10,Two=20;
Callme(One;Two);
Callme(Two);
}
void Callme(int Arg1,int Arg2)
{
Arg1=Arg1+Arg2;
Count<<Arg1>>Arg2;
}
Ans:
void Callme(int Arg1,int Arg2=20);
#include<iostream.h>
void main( )
{
int One=10,Two=20;
Callme(One,Two); //Given ; instead of ,
Callme(Two);
}
void Callme(int Arg1,int Arg2)
{
Arg1=Arg1+Arg2;
cout<<Arg1<<Arg2;
}

Computer Science By Mr. MRK
|