What is Function call?

Function call means calling of a function to execute the statements of the function. A function call contains the name of function and the arguments that are sent to the function. When we call a function control is transferred to that particular function, executes the statements within that function and returns back after executing that function.

Eg:
Void add (int c, int d)
{
Printf (“%d”, c+d);
}
Void main ()
{
Int a=12,b=10;
Add (a,b); //Funtion call
}

What are the diiferent methods of calling Functions?

There are two methods of calling a function:
1. Call by value method
2. Call by reference method

What is Call by value method?

In call by value method values of the variables are send at the time of function call. It makes the copies of variables that are sent to the function because of which any changes made by the function are not reflected in the original variables.

Eg: Program of swapping values of two variables by using call by value method
Void swap (int c,int d)
{
Int temp;
temp=c;
c=d;
d=temp;
}
Void main()
{
int a=10, b=20;
swap(a,b);
printf (“Value of a is %d \n value of b is %d”,a, b);
getch();
}
Output:
Value of a is 10 value of b is 20

What is Call by reference method?

In call by reference method addresses of the variables in memory are send at the time of function call rather than their values. Due to this any changes made by the function are reflected in the original variables.

Eg: Program of swapping values of two variables by using call by reference method
Void swap (int *c,int *d)
{
int temp;
temp=c;
c=d;
d=temp;
}
Void main ()
{
int a=10,b=20;
swap (&a, &b);
printf(“Value of a is %d \n value of b is %d”,a,b);
getch();
}
Output:
Value of a is 20 value of b is 10

What is Function overloading?

Fuction overloading means defining more than one function having same name in a class or defining multiple functions of same name. Function overloading is used to define same name functions that perform similar operations on different data types of arguments and in this way it implements polymorphism because a single function name is used for performing multiple operations. In case of function overloading, compiler calls the different functions by checking their data type, the number of arguments of the functions, their order in the function call and function definition.

E.g. of Function Overloading:
Class area
{
Double ar;
Public:
Void Area(int s)
{
Ar=s*s;
}
Void Area(int l,int b)
{
Ar=l*b;
}
Void Area(float r);
{
Ar=3.142*r*r;
}

What are the Constructors?

Constructors are the member functions of class which have the same name as that of class name and are used to initialize data of class which is also known as member data.
Constructors are basically used to assign values to the variables of class as we cannot assign values to them at the time of their declaration. We do not have to call them as they are called automatically when we create an object of class.

Features of Constructors:
1. Constructors have same name as that of class name.
2. They are basically used to give initial values to the data of class.
3. They are automatically called by the compiler when object of the class is created.
4. We can overload the constructors. Defining multiple constructors in a class is known as Constructor overloading.

Types of Constructors:
1. Default Constructor
2. Parameterized Constructor
3. Copy Constructor

Who invented C#?

C# (CSharp) programming language was developed by a team under the leadership of Anders Hejlsberg at Microsoft in 2001. C# is one of the languages supported by .NET framework and is used for making windows applications, dynamic websites and web services.

Who invented Basic?

Basic (Beginner All-purpose Symbolic Instruction Code) was developed by George Kemeny and Tom Kurtzas in 1964 at Dartmouth College of USA. It is a high level programming language and easy for the beginners to understand and use. BASIC influenced the development of programming languages like Visual BASIC, Visual BASIC.NET etc.

Who invented FORTAN?

FORTRAN (Formula Translation), a programming language was developed by a team under the leadership of “John Backus” at IBM in 1957. FORTRAN was used for solving complex mathematical problems. It was also used for solving scientific and statistical problems.

Who invented COBOL?

COBOL (Common Business Oriented Language) was invented by a Committee which consists of six members William Selden, Gertrude Tierney, Howard Bromberg, Howard Discount, Vernon Reeves, and Jean E. Sammet under the guidance of “Grace Hopper” in 1959. COBOL was used for solving business and financial problems etc.