| Other C++ General Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How to avoid changing constant values? | Symphony | 1 |
| What C++ libraries are you proficient with? | Google | 1 |
| How is an Abstract Base Class(ABC) related to an "Abstract
Data Type" (ADT) | | 2 |
| class professor {};
class teacher : public virtual professor {};
class researcher : public virtual professor {};
class myprofessor : public teacher, public researcher {};
Referring to the sample code above, if an object of class
"myprofessor" were created, how many instances of professor
will it contain?
a) 0
b) 1
c) 2
d) 3
e) 4
| Quark | 1 |
| Explain about profiling? | | 1 |
| What is the Difference between "C structure" and "C++
structure"? | | 4 |
| What compiler was used?
| Intel | 3 |
| What is your strongest programming language (Java, ASP, C,
C++, VB, HTML,C#, etc.)? | Microsoft | 20 |
| When to use Multiple Inheritance? | | 4 |
| this is to swap to strings....but in output the whole
strings are swapped leaving first as it is...why it is so
#include<iostream.h>
int main()
{
char a[]="ajeet";
char b[]="singh";
long x=*a;
long y=*b;
cout<<x<<":"<<y;
x=x+y;
y=x-y;
x=x-y;
*a=x;
*b=y;
cout<<x<<":"<<y;
cout<<&a<<endl;
cout<<&b<<endl;
} | | 1 |
| Shall we use 'free' to free memory assigned by new, What are
the further consequences?? | Symphony | 4 |
| What is the Difference between "vector" and "array"? | TCS | 6 |
| structure contains int, char, float how it behaves for big
endian and little endian? | BITS | 1 |
| How many pointers are required to reverse a link list? | CTS | 2 |
| string somestring ;
Which of the following choices will convert a standard C++
string object "somestring" to a C string?
a) Copy.somestring () ;
b) somestring.c_str ()
c) &somestring [1]
d) std::cstring (somestring)
e) (char *) somestring
| Quark | 1 |
| What is the Maximum Size that an Array can hold? | Satyam | 31 |
| What is Object Oriented programming.what is the difference
between C++ and C? | Infosys | 5 |
| What is problem with Runtime type identification?
| | 1 |
| Can we have "Virtual Constructors"? | TCS | 5 |
| In a class, there is a reference or pointer of an object of
another class embedded, and the memory is either allocated
or assigned to the new object created for this class. In
the constructor, parameters are passed to initialize the
data members and the embedded object reference to get
inialized. What measures or design change should be advised
for proper destruction and avioding memory leaks, getting
pointers dangling for the embedded object memory
allocation? Please suggest. | GE | 3 |
| |
| For more C++ General Interview Questions Click Here |