What are the basic concepts of object oriented programming?
Correct Answer
It is necessary to understand some of the concepts used extensively in object oriented programmingThese include Objects Classes Data abstraction and encapsulation Inheritance Polymorphism Dynamic Binding Message passing
Correct Answer: C++ is created by Bjarne Stroustrup of AT&T Bell Labs as an extension of C, C++ is an object-oriented computer language used in the development of enterprise and commercial applications Microsoft?s Visual C++ became the premier language of choice among developers and programmers
Correct Answer: In C++, void represents the absence of type, so void pointers are pointers that point to a value that has no type The void pointers can point to any data type You can declare void pointer as follows: void *p;
3. What is the data structures used to perform recursion?
Correct Answer: Stack Because of its LIFO (Last In First Out) property it remembers its ?caller? so knows whom to return when the function has to return Recursion makes use of system stack for storing the return addresses of the function calls Every recursive function has its equivalent iterative (non-recursive) function Even when such equivalent iterative procedures are written, explicit stack is to be used
4. In an AVL tree the balancing is to be done when the pivotal value is in range of
Correct Answer: An in-stream PROC is defined right in the jcl stream and doesn't reside in the proclib This is an older technique associated with punched cards but it is still in use with setup and installation programs from vendors for the in-line perform instead of: perform add-paragraph until switch = 'y' you can code perform until switch = 'y' body of code end-perform body of code is the code from add-paragraph appearing in-line (ie right in the perform) instead of in a separate paragraph (out of line code)
Correct Answer: All the features of C are similiar to C++ except some features, such as polymorphism, operator overloading which are supported in C++ but not in C language Both C and C++ language is similiar in their functionality but C++ provides with more tools and options
Correct Answer: A destructor is automatically called when the object is destroyed A virtual destructor in C++ is used primarily to prevent resource leaks by performing a clean-up of the object
Correct Answer: ConstKeyword indicates that memory once initialized, should not be altered by a program Volatile keyword indicates that the value in the memory location can be altered even though nothing in the program Mutable keyword indicates that particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant