Important Question On C Language Asked in Interview or Viva

Important Question On C Language Asked in Interview or Viva

Well following are the commonly asked interview question which you may have to face in your interview or Campus interview Selection rounds ....

1.Define friend function.
A: A friend function is a non-member function of a class which has access to the private members of that class.

2.How is they declared and defined?
A: A friend function is declared in a class using the keyword friend. It is defined outside the class like any other normal functions.

3.How is a friend function invoked?

A: A friend function is invoked like a normal function in C++.

4.What are reference variables and what is their use?

A: A reference variable acts as alias to the another variable.

5.What are the features of OOP?

A: 1:Class,2.Object,3.Data abstraction and encapsulation,4.Polymorphism,5.Dynamic binding,6.Message passing.

6.What is dynamic binding?

A: The linkage between a procedure call and the code to be executed is known at run time is called dynamic binding. It’s related to polymorphism.

7.Define polymorphism.

8.What are two types of polymorphisms? Give example for both.

A: Compile time polymorphism and run-time polymorphism,eg: function overloading and virtual functions respectively.

9.What is a do nothing function?

A: A function declared in a base class and does not do any operations and is redefined in sub classes is called a do nothing function.

10.Define pointers.

A: Pointers are used to store address of memory locations.

Best of Luck Friends.... :)

Related Links :

No comments:

Post a Comment

If you face any Problem in viewing code such as Incomplete "For Loops" or "Incorrect greater than or smaller" than equal to signs then please collect from My Web Site CLICK HERE

More Useful Topics...


History Of C..

In the beginning was Charles Babbage and his Analytical Engine, a machine
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming

My 1st Program...

void main ()
clrscr ();
printf ("\n\n\n\n");
printf ("\t\t\t*******Pankaj *******\n");
printf ("\t\t\t********************************\n");
printf ("\t\t\t\"Life is Good...\"\n");
printf ("\t\t\t********************************");
getch ();

Next Step...


void main ()
clrscr ();
printf ("\n\n\n\n\n\n\n\n");
printf ("\t\t\t --------------------------- \n\n");

printf ("\t\t\t | IGCT, Info Computers, INDIA | \n\n");
printf ("\t\t\t --------------------------- ");

getch ();