Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1


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


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





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
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.
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++?
What are the differences between a class and an object?
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.
What are the differences between a structure and a class?
There is no difference in structure and a class except that class members are private by default and structure members are public by default.
What is the difference b/n public, private and protected?
The data members and 
having public as access outside the class.
The data members and methods declared as protected will be accessible to the class methodsand the derived class methods only.
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 
What is a void return type?A void return type indicates that a method does not return a value.
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

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