You are on page 1of 1

REVISION WORKSHEET 1

CLASS 12
Answer the following questions :1Find the output of the following program:
#include <iostream.h>
void see(int b[], int v)
{
for (int t = 1;t < v; t++)
b[t-1] =b[t-1]+ b[t];
}
void main()
{
int x[3] = {6,7,8}, y[3]={1,2,3,4}, z[]={11,12};
see(x, 3);
see(y, 4);
see(z, 2);
for (int w = 0;w < 3;w++) cout<<x[w]<< #; cout<<endl;
for (w = 0;w < 4;w++) cout << y[w] << #; cout << endl;
for (w = 0;w < 2;w++) cout<<z[w] << #;
}
234-

What is the difference between call by value and call by reference? Give an example in C++ to illustrate both.
Write the names of the some function of following header files :<ctype.h>,<iomanip.h>,<string.h>,<maths.h>,<stdio.h>,<stdlib.h>,<conio.h>
In the following program, find the correct possible output(s) from the options:
#include <stdlib.h>
#include <iostream.h>
void main ( )
{ randomize( );
char v[][10]= {India, Shimla, Etwa, Wolf};
int c;
for(int I = 0; I <3, I++)
{ c = random (2) +1;
Cout<<v[c]<<:;
} }

5- Define the following :- (a) random() (b) isalpha() (c) strcmp() (d) strcpy()
6-Explain types of Constructor with example
7-Explain Constructor overloading with example.
8- Polymorphism means function overloading yes or no.
9- Define all visibility mode with example.
10- Give example of static and inline function and data member.

You might also like