ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What issue do auto_ptr objects address?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What issue do auto_ptr objects address?
Answer
# 1
auto_ptr addresses, issues relating to memory management 
like, Memory Leaks and Dangling pointers.
 
Is This Answer Correct ?    0 Yes 0 No
Ravi
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is a pure virtual function? Why is it represented as = 0...how is the internal implementation for the same CTS3
why can't we declare data member of class auto register or extern  1
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 Quark1
What is the difference between static global and global ? CA2
How many lines of code you have written for a single program? BoA1
template<class T, class X> 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; } Quark1
Write a program to swap 2 chars without using a third varable? char *s = "A"; char *p = "B"; CTS1
What is Object Oriented programming.what is the difference between C++ and C? Infosys5
Explain the difference between 'operator new' and the 'new' operator? Lucent1
What happens if an exception is throws from an object's constructor and from object's destructor? TCS2
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. GE3
How the V-Table mechanism works? HP3
What are the differences between public, private, and protected access? Wipro3
Given a simple program designed to take inputs of integers from 1-1000 and to output the factorial value of that number, how would you test this program? You do not have access to the code. Please be as specific as possible. Microsoft2
why the size of an empty class is 1  3
When volatile can be used? Symphony2
Find out the bug in this code,because of that this code will not compile....... #include <iostream> #include <new> #include <cstring> 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; }  2
What is the Maximum Size that an Array can hold? Satyam31
what is an array  12
How to construct virtual constructor Symphony4
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com