1.

Write the output of the following C++ code. Also, write the name of feature of Object Oriented Programming used in the following program jointly illustrated by the Function 1 to Function 4.void My_fun ( )     // Function 1{for (int I=1 ; I<=50 ; I++) cout<< "-" ;cout<<end1 ;}void My_fun (int N)    // Function 2{for (int I=1 ; I<=N ; I++) cout<<"*" ;cout<<end1 ;}void My_fun (int A, int B)    // Function 3{for (int I=1. ;I<=B ;I++) cout <<A*I ;cout<<end1 ;}void My_fun (char T, int N) // Function 4{for (int I=1 ; I<=N ; I++) cout<<T ;cout<<end1;} void main ( ){int X=7, Y=4, Z=3;char C='#' ;My_fun (C,Y) ;My_fun (X,Z) ;} 

Answer»

####

71421

Polymorphism

OR

Function Overloading



Discussion

No Comment Found

Related InterviewSolutions