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 6914

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 10267

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 6427

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

Hughes,

5 9081

How do I open binary files?

1 5326

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

2 7076

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 5724

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 6506

what is meaning of isa and hsa

1 7749

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

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

58 73622

What will happen if when say delete this ?

7 16022

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

12 50286

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

Wipro,

3 8329

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

3 7081

Explain the need for "Virtual Destructor"?

Infosys,

2 8173


Post New C++ General Questions

Un-Answered Questions { C++ General }

Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes

1044


Describe the setting up of my member functions to avoid overriding by the derived class?

1090


What parameter does the constructor to an ofstream object take?

1023


Is it possible for the objects to read and write themselves?

1065


What are the types of pointer?

1047


Explain the difference between struct and class in terms of access modifier.

1146


Can I run c program in turbo c++?

987


How do you traverse a btree in backward in-order?

987


Using a smart pointer can we iterate through a container?

1041


Why is c++ called oops?

1094


Do vectors start at 0?

955


Is java based off c++?

939


What is a breakpoint?

971


What are c++ variables?

1015


Can a program run without main in c++?

1144