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++ General Interview Questions
Questions Answers Views Company eMail

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 6891

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 10243

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 6395

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

Hughes,

5 9038

How do I open binary files?

1 5301

How is an Abstract Base Class(ABC) related to an "Abstract Data Type" (ADT)

2 7054

what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?

2 5700

Find out the bug in this code,because of that this code will not compile....... #include #include #include using namespace std; class balance { double cur_bal; char name[80]; public: balance(double n, char *s) { cur_bal = n; strcpy(name, s); } ~balance() { cout << "Destructing "; cout << name << "\n"; } void set(double n, char *s) { cur_bal = n; strcpy(name, s); } void get_bal(double &n, char *s) { n = cur_bal; strcpy(s, name); } }; int main() { balance *p; char s[80]; double n; int i; try { p = new balance [3]; // allocate entire array } catch (bad_alloc xa) { cout << "Allocation Failure\n"; return 1; }

Impetus,

2 6467

what is meaning of isa and hsa

1 7727

What is the output of printf("%d")?

CTS, HCL, Infosys, TCS, Winit, Wipro,

58 73140

What will happen if when say delete this ?

7 15966

What is the Difference between "C structure" and "C++ structure"?

12 50170

What is the Diffrence between a "assignment operator" and a "copy constructor"?

Wipro,

3 8283

What is the difference between "overloading" and "overridding"?

3 7045

Explain the need for "Virtual Destructor"?

Infosys,

2 8146


Post New C++ General Questions

Un-Answered Questions { C++ General }

Explain explicit container.

1034


Which field is used in c++?

1047


Should you pass exceptions by value or by reference?

1086


What do you mean by friend class & friend function in c++?

1009


When should we use container classes instead of arrays?

971


Can non-public members of another instance of the class be retrieved by the method of the same class?

1029


What is setw manipulator in c++?

1013


What is a constant? Explain with an example.

952


What is abstraction in c++?

1270


What are proxy objects in c++?

1129


Define whitespace in C++.

1144


Is java as fast as c++?

1045


How many types of scopes are there in c++?

1034


Explain about vectors in c ++?

969


What is the difference between a type-specific template friend class and a general template friend class?

930