fbpx

The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance. It allows the extension and reuse of existing code without having to rewrite the code from scratch. Inheritance is the process by which objects of one class acquire properties of objects of another class.

Polymorphism means one name, multiple forms. It allows us to have more than one function with the same name in a program.It allows us to have overloading of operators so that an operation can exhibit different behaviours in different instances.

All the features of C issimilar to C++ except some features, such as polymorphism, operator overloading which are supported in C++ but not in C language. b. Both C and C++ language is similiar in their functionality but C++ provides with more tools and options.

The wrapping up of data and functions into a single unit (called class) is known as encapsulation. Encapsulation containing and hiding information about an object, such as internal data structures and code.

An object oriented program consists of a set of objects that communicate with each other. Message passing involves specifying the name of the object, the name of the function and the information to be sent.

The smallest individual units of a program is known as tokens. c++ has the following tokens :
a. Keywords
b. Identifiers
c. Constants
d. Strings
e. Operators

A structure variable contains each of the named members, and its size is large enough to hold all the members. Structure elements are of same size. A union contains one of the namedmembers at a given time and is large enough to hold the largest member. Union element can be of different sizes.

Structure is a collection of heterogeneous data type but array is a collection of homogeneous data types. Array 1-It is a collection of data items of same data type. 2-It has declaration only 3-.There is no keyword. 4- array name represent the address of the starting element. Structure 1-It is a collection of data items of different data type. 2- It has declaration and definition 3- keyword struct is used 4-Structure name is known as tag it is the short hand notation of the declaration.

Functions are declared within header file. That is function prototypes exist in a header file,not function bodies. They are defined in library (lib).

calloc(…) allocates a block of memory for an array of elements of a certain size. By default the block is initialized to 0. The total number of memory allocated will be (number_of_elements * size). malloc(…) takes in only a single argument which is the memory required in bytes. malloc(…) allocated bytes of memory and not blocks of memory like calloc(…). malloc(…) allocates memory blocks and returns a void pointer to the allocated space, or NULL if there is insufficient memory available. calloc(…) allocates an array in memory with elements initialized to 0 and returns a pointer to the allocated space. calloc(…) calls malloc(…) in order to use the C++ _set_new_mode function to set the new handler mode.

Macro is a Pre-processor. Major advantage of using the macro is to increase the speed of the execution of the program. Major disadvantage of the macros are: 1. No type checking is performed in macro. This may cause error. 2. A macro call may cause unexpected results.

The C programming language is a standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system. It has since spread to many other operating systems, and is one of the most widely used programming languages. C is prized for its efficiency, and is the most popular programming language for writing system software, though it is also used for writing applications.

Yes. The const modifier means that this code cannot change the value of the variable, but that does not mean that the value cannot be changed by means outside this code. The function itself did not change the value of the timer, so it was declared const. However, the value was changed by hardware on the computer, so it was declared volatile. If a variable is both const and volatile, the two modifiers can appear in either order.

http://www.itsdigitalindia.com/wp-login.php?redirect_to=http%3A%2F%2Fitsdigitalindia.com%2Fwp-admin%2F&reauth=1