Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
t=1250652402-13456897-c-notes-by-yatendra-kashyap

t=1250652402-13456897-c-notes-by-yatendra-kashyap

Ratings: (0)|Views: 89|Likes:
Published by zsunil678
this is c notes
this is c notes

More info:

Published by: zsunil678 on Sep 05, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/11/2014

pdf

text

original

 
 
EXPECTED VIVA QUESTIONS
1.What is a class?Class is concrete representation of an entity. It represents a group of objects, which hold similar attributes andbehavior. It provides Abstraction and Encapsulations. Classes are generally declared using the keyword
class.
2.What is an Object? What is Object Oriented Programming?Object represents/resembles a Physical/real entity. An object is simply something you can give a name.Object Oriented Programming is a Style of programming that represents a program as a system of objects and enables code-reuse.
Object is asoftware bundleof variables and related methods.Objects have state and behavior. object is a real life entity which contains data and functionsto operate on that data.
3.What is Encapsulation?Encapsulation is binding of attributes and behaviors. Hiding the actual implementation and exposing thefunctionality of any object. Encapsulation is the first step towards OOPS, is the procedure of covering upof data and functions into a single unit (called class). Its main aim is to protect the data from out sideworld4.What is Abstraction?Hiding the complexity. It is a process of defining communication interface for the functionality andhiding rest of the things.5.What is Overloading?Adding a new method with the same name in same/derived class but with different number/types of parameters. It implements Polymorphism.6.What is Inheritance?It is a process in which properties of object of one class acquire the properties of object of anotherclass.7.What is an Abstract class?An abstract class is a special kind of class that cannot be instantiated. It normally contains one or moreabstract methods or abstract properties. It provides body to a class.
8.
What is Polymorphism? And its type?
Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (orreference) to assume (be replaced by) or become many different forms of object.Example: function overloading, function overriding, virtual functions. Another example canbe a plus? +? sign, used for adding two integers or for using it to concatenate two stringsThere are two types of polymorphism-
1)Run time polymorphism –Address of the function determine at the runtime is
 
known as runtime polymorphism2) Compile time polymorphism- Address of the function determine at the compiletime is known as runtime polymorphism
9.What do you mean by iostream.h?10What is inheritance and its type?11What is the difference between c and c++?
12.
 
What are the differences between a class and an object?
Ans:
Object is an instance of a class. The class is a blueprint of all the objects whichShare common properties and the behavior. Class represents the abstract data type andObject is a real-world entity.
12
What are the differences between a structure and a class?
Ans:
There is no difference in structure and a class except that class members are private by default and structure members are public by default.
13
What is the difference b/n public, private and protected?
1.
Public:
The data members and 
having public as access outside the class.
2.
Protected:
The data members and methods declared as protected will be accessible to the class methodsand the derived class methods only.
3.
Private:
These data members and methods will be accessible not from objects created outside the class.
14What is the difference b/n variable declaration and definition?
 
DefinitionDefinitionEx - int a=5Ex - int a=5
Tell theTell the compiler compiler  about theabout the variable: itsvariable: its type andtype and name, asname, as well aswell as allocated aallocated a memorymemory cell for cell for the variablethe variable 
DeclarationDeclarationEx- int aEx- int a
DDescribeescribe informationinformation ``about'' the``about'' the variablevariable,, doesn’tdoesn’t allocateallocate memorymemory cell for thecell for the variablevariable 
15
What is a void return type?A void return type indicates that a method does not return a value.
16
What is the difference between a while statement and a do statement?A while loop is a entry control loop .A do while loop is a exit control loop, in this loop at leastone time a condition is executed always and it also terminated with semicolon.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->