c job interview questions in Wipro

Posted by Unknown at 23:15

What is structure in C++?
answer: The C++ programming technique allows defining user defined datatypes through structure. The syntax to declare structure is as follows:.............


What is reference variable in C++?
answer: A reference variable is just like pointer with few differences. It is declared using & operator. A reference variable must always be initialized. The reference variable.............



What is class using C++?
answer: A class holds the data and functions that operate on the data. It serves as the template of an object..............

What is local class in C++?
answer: Local class is define within the scope of a function and nested within a function..............

What is the default access level?
answer: The access privileges in C++ are private, public and protected. The default access level assigned to members of a class is private..............


What is friend class in C++?
answer: When a class declares another class as its friend, it is giving complete access to all its data and methods including private and protected data and methods to the friend class member methods..............


Explain default constructor. What is a default constructor?
answer: Default constructor is the constructor with no arguments or all the arguments has default values..............

Define abstraction. What is abstraction? What is an abstraction and why is it important?
answer: The process of hiding unnecessary data and exposing essential features is called abstraction. Abstraction is separating the logical properties from implementation details..............

What is overriding?
answer: Defining a function in the derived class with same name as in the parent class is called overriding. In C++, the base class member can be overridden by the derived.............

What is copy constructor?
answer: A copy constructor is a special type of constructor that is used to create an object as a copy of an existing object..............






Define private, protected and public access control.
answer: Private is the default access specifier for every declared data item in a class. Private data belongs to the same class in which it is created and can only be used.............

What is Turbo C++?
answer: Turbo C++ provides an environment called IDE (Integrated Development.............

How to control the number of chars read in a string by using scanf()?

answer: Doing this limits the length of the characters that will be read by scanf() to 20 characters maximum although the buffer can hold 25 characters. .............

How to detect an end of a file?

answer: You can either use the ifstream object ‘fin’ which returns 0 on an end of file or you can use eof().............

What are recursive functions? What are the advantages and disadvantages of Recursive algorithms?
answer: A recursive function is a function which calls itself. The advantages of recursive functions are: -Avoidance of unnecessary calling of functions. A substitute for iteration where the iterative solution is very complex..............

What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator.
answer: An internal iterator is implemented by the member functions of the class which has the iteration logic..............

Explain passing objects by reference, passing objects by value and passing objects by pointer.
answer: Pass by value: The callee function receives a set of values that are to be received by the parameters. All these copies of values have local scope, i.e., they can be accessed only by the callee function..............

Explain the concepts of throwing and catching exceptions with an example using C++.
answer: C++ provides a mechanism to handle exceptions which occurs at runtime. C++ uses the keywords – throw, catch and try to handle exception mechanism..............

What are the advantages of “throw.....catch” in C++?
: The following are the advantages of throw and catch in c++. Code isolation: All code that is to be handled when an exception raises is placed in the catch block, which is not part of the original code..............

What are friend classes? What are advantages of using friend classes?
answer: The friend function is a ‘non member function’ of a class. It can access non public members of the class. A friend function is external to the class definition..............






What are zombie objects in C++? Explain its purpose.
answer: An object creation of a class is failed before executing its constructor. As a constructor would not return a value, there is no confirmation that whether the constructor is executed completely or not..............


Explain the difference between Stack and Queue
answer: Stack is a Last in First out (LIFO) data structure whereas Queue is a First in First out (FIFO) data structure..............

What is Stack? Explain its uses.
answer: Stack is a Last in First out (LIFO) data structure. It is a linear structure and one can insert and delete from one end only which is called the top. It is very effective in.............

What is a Wrapper class?
answer: Wrapper classes are classes that allow primitive types to be accessed as objects..............


What do you mean by stack unwinding?
answer: When an exception is thrown, C++ calls destructors to destroy all the objects formed since the beginning of the try block. The objects are destroyed in the.............

What is the use of ‘using’ declaration?
answer: In using-declaration, we have using keyword followed by a fully qualified name of a namespace member..............


What is the difference between Mutex and Binary semaphore?
answer: Semaphore synchronizes processes where as mutex synchronizes threads running in the same process..............

What is the scope resolution operator?
answer: Scope resolution operator allows a program to reference an identifier in the global scope that is hidden by another identifier with the same name in the local scope..............


What are the advantages of inheritance?

answer: Code reusability
Saves time in program development..............






What is a conversion constructor?
answer: It is a constructor that accepts one argument of a different type..............

Explain the advantages of inline functions.
answer: It relieves the burden involved in calling a function. It is used for functions that need fast execution..............

Explain the different access specifiers for the class member in C++.
answer: private: It is default one and can be access from class member of the same class.
protected: The protected members can be access from member functions of the.............

What is the importance of mutable keyword?
answer: The mutable keyword allows the data member of a class to change within a const member function..............

Pointer vs. reference.
answer: A reference must be initialized at the time of declaration whereas not needed in case of pointer. A pointer can point to a null object..............

Explain how to call C functions from C++.
Latest answer: The extern keyword is used to call C functions from C++.............
Read answer

How do we declare a class as a friend of another class?
Class vs. Structure

Latest answer: Class: Class has private as default access specifier. Default inheritance type is private..............
Read answer
Explain how to call a base member function from derived class member function.
Is it possible to overload a constructor?

Latest answer: Yes it is possible. A constructor can be overloaded to pass different arguments to the object..............
Read answer
Overriding vs. overloading
Latest answer: Overloading means having methods with same name but different signature
Overriding means rewriting the virtual method of the base class.............
Read answer


What do you mean by binding? Static vs. dynamic binding
answer: Binding means connecting the function call to a function implementation..............
Read answer



What is abstract class?
Latest answer: A class whose object can't be created is abstract class. You can create a class as abstract by declaring one or more virtual functions to pure..............
Read answer


Vector vs. Map
Latest answer: In a vector, all the elements are in a sequence whereas Map stores element in the form of a key-value association pair..............
Read answer

List down elements of an object oriented language.
Latest answer: A class is a user defined data type. It serves as a template of the objects.....
Read answer

Explain constructors and destructors.
Latest answer: Constructors are the member functions of the class that executes automatically whenever an object.......
Read answer


Define access privileges in C++.
Latest answer: You have access privileges in C++ such as public, protected and private that helps.........
Read answer




Explain the difference between structures and classes
Latest answer: Syntactically and functionally, both structures and classes are...........
Read answer

Explain container class and its types in C++.

Latest answer: A container stores many entities and provide sequential or direct access to them. List, vector and strings are............
Read answer

Define storage classes in C++

Latest answer: Storage class defined for a variable determines the accessibility and longevity of the variable. The accessibility.......
Read answer





Define an Iterator class
Latest answer: A container class hold group of objects and iterator class is used to traverse through the objects maintained..........
Read answer




What are pure virtual functions?
Latest answer: The base class with pure virtual function can't be instantiated since there is no definition...........
Read answer


click the Below link download this file 


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

0 comments:

Have any question? Feel Free To Post Below:

Blog Archive

 

© 2011. All Rights Reserved | Interview Questions | Template by Blogger Widgets

Home | About | Top