• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

CPlusPlus Interview Questions Answers

Question - 101 : - What is a Makefile?

Answer - 101 : - Makefile is a utility in Unix to help compile large programs. It helps by only compiling the portion of the program that has been changed. A Makefile is the file and make uses to determine what rules to apply. make is useful for far more than compiling programs.

Question - 102 : - How does throwing and catching exceptions differ from using setjmp and longjmp?

Answer - 102 : - The throw operation calls the destructors for automatic objects instantiated since entry to the try block.

Question - 103 : - What is a class?

Answer - 103 : - Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.

Question - 104 : - Could you tell something about the Unix System Kernel?

Answer - 104 : - The kernel is the heart of the UNIX openrating system, it’s reponsible for controlling the computer’s resouces and scheduling user jobs so that each one gets its fair share of resources.

Question - 105 : - What is Boyce Codd Normal form?

Answer - 105 : - A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a-> , where a and b is a subset of R, at least one of the following holds: * a- > b is a trivial functional dependency (b is a subset of a) * a is a superkey for schema R

Question - 106 : - STL Containers - What are the types of STL containers?

Answer - 106 : - There are 3 types of STL containers: 1. Adaptive containers like queue, stack 2. Associative containers like set, map 3. Sequence containers like vector, deque

Question - 107 : - What is the difference between an object and a class?

Answer - 107 : - Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects. - A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change. - The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed. - An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change. Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321]. quicksort ((data + 222), 100);

Question - 108 : - What methods can be overridden in Java?

Answer - 108 : - In C++ terminology, all public methods in Java are virtual. Therefore, all Java methods can be overwritten in subclasses except those that are declared final, static, and private.

Question - 109 : - How do I initialize a pointer to a function?

Answer - 109 : - This is the way to initialize a pointer to a function void fun(int a) { } void main() { void (*fp)(int); fp=fun; fp(1); }

Question - 110 : - What do you mean by inheritance?

Answer - 110 : - Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments and refinements of its own.

Computer Contributors

Rajeev Katiyar
Yes Baroda

Share your email for latest updates


Our partners