CBSE eBooks

CBSE Guess > eBooks > Class XII > Computer Science By . Mr. MRK

Chapter – 1 C++ Revision Tour

Previous Index Next

2001:

1.b. Name the header file to be included for the use of the following built in functions: (i)getc( ) (ii)strcat() 1

Ans:

  1. getc( ) - stdio.h
  2. strcat( ) - string.h

1.e. Give the output of the following program:

#include<iostream.h>
#include<conio.h>
int g=20;
void func(int &x,int y)
{
x=x-y; y=x*10;
cout<<x<<’,’<<y<<’\n’;
}
void main( )
{
int g=7; func(g,::g);
cout<<g<<’,’<<::g<<’\n’;
func(::g,g);
cout<<g<<’,’<<::g<<’\n’;
}

Ans: Output:

-13,-130
-13,20
33,330
-13,33

2000:

1.b. Name the header file, to which following built in function belong:

  1. i supper( )
  2. setw()
  3. exp( )
  4. strcmp( )

Ans:

  1. isupper( ) - ctype.h
  2. setw( ) - iomanip.h
  3. exp( ) - math.h
  4. strcmp( ) - string.h

Previous Index Next