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

What is Method overloading?

5 10222

Can we call a base class method without creating instance?

6 23802

In which cases you use override and new base?

2 7780

You have one base class virtual function how will call that function from derived class?

4 9443

In which Scenario you will go for Interface or Abstract Class?

InfoAxon Technologies,

1 10724

1. What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&v); cout<

Quark,

5 10859

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever

Datavance, Quark, VEL, Wipro,

17 56547

Which uses less memory? a) struct astruct { int x; float y; int v; }; b) union aunion { int x; float v; }; c) char array[10];

Quark,

4 9231

Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); a) 10 b) 11 c) 1

Quark,

4 11818

Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast

Quark,

2 7331

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,

4 11695

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 7117

class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; What is the access level for the member function "setx" in the class "derived" above? a) private b) local c) global d) public e) protected

Quark,

3 8861

class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData

Quark,

2 9417

class HasStatic { static int I; }; Referring to the sample code above, what is the appropriate method of defining the member variable "I", and assigning it the value 10, outside of the class declaration? a) HasStatic I = 10; b) int static I = 10; c) static I(10); d) static I = 10; e) int HasStatic::I = 10;

Quark,

1 5433


Un-Answered Questions { C++ }

what Is DCS ? what i will get benefit when i did?

2353


What is the type of 'this' pointer?

1016


What is array give example?

1046


What is data binding in oops?

1084


How do you achieve runtime polymorphism?

1045


How do you define social class?

1059


Write a program to find the reverse Fibonacci series starting from N.

1264


what do you mean by volatile variable?

1048


What are the basics of local (auto) objects?

1140


What is a pointer how and when is it used?

1090


Explain why C++ is not purely Object Oriented Language

1077


What is an adaptor class in c++?

1173


Is facebook written in c++?

991


How would perform Pattern Matching in C++?

1228


What are manipulators used for?

1091