Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



C++ Interview Questions
Questions Answers Views Company eMail

class X { private: int a; protected: X(){cout<<"X constructor was called"<

Quark,

2 7414

class Foo { const int x; protected: Foo(int f); ~Foo(); }; Foo f; Referring to the sample code above, why will the class declaration not compile? a) The variable x is const. b) The destructor is protected. c) The destructor is not public. d) The constructor is protected. e) There is no default constructor.

Quark,

5 12467

class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list

Quark,

2 13095

Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.

Quark,

4 10756

The "virtual" specifier in a member function enables which one of the following? a) Monmorphism b) Late binding c) Metamorphism d) Solomorphism e) Inheritance

Quark,

4 11821

class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.

Quark,

2 11049

template class Obj { T my_t; X my_x; public: Obj(T t, X x) : my_t(t), my_x(x) { } }; Referring to the sample code above, which one of the following is a valid conversion operator for the type T? a) T operator T () { return my_t; } b) T operator(T) const { return my_t; } c) operator(T) { return my_t; } d) T operator T (const Obj &obj) { return obj.my_t; } e) operator T () const { return my_t; }

Quark,

1 6451

catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e;

Quark,

2 7029

int f() { int I = 12; int &r = I; r += r / 4; int *p = &r; *p += r; return I; } Referring to the sample code above, what is the return value of the function "f()"? a) 12 b) 15 c) 24 d) 17 e) 30

AIG, Quark,

2 10346

what is the diff b/n c and c++ a. dynamic scoping b. nested switching c. declaration of variables in any code block d. separation of compilation and linking

Hughes,

2 6525

polymorphism means?

BFL,

6 13914

In a class only declaration of the function is there but defintion is not there then what is that function?

Hughes,

5 9258

Describe the difference between a Thread and a Process?

Siebel Systems,

11 33575

Describe what an Interface is and how it?s different from a Class.

Spinsys,

7 23665

What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

1 9281


Un-Answered Questions { C++ }

What is the purpose of templates in c++?

1037


Which of the following is evaluated first: a) && b) || c) !

2370


What are the advantages of using typedef in a program?

1142


What is polymorphism explain?

1256


What is difference between c++ and c ++ 14?

1055


Const char *p , char const *p What is the difference between the above two?

1217


Differentiate between the manipulator and setf( ) function?

1208


What is and I oop mean?

1207


What is function overloading c++?

1077


Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be

1419


What is the difference between abstraction and polymorphism?

1101


Is c++ map a hash table?

1028


What is multilevel inheritance explain with example?

1149


What is class syntax c++?

1159


Explain the difference between overloading and overriding?

1143