ALLInterview.com :: Home Page      
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
 Categories >> Software >> Programming Languages >> C++
 
  STL (96)   OOPS (569)   C++ General (466)
 
Suggest New Category 
 


 

Question Asked @ Answers Views     Select
Generally variables are stored in heap memory. When he variables are created in stack? persistent   4  1987
Ask to write virtual base class code? satyam   0  293
What is size of Empty Class? persistent   3  2513
If there are 1 to 100 Numbers in array of 101 elements. Which is the easy way to find repeated number? persistent   2  2399
Copy Linked List using recursive function? persistent   2  2060
which is the easy way to divide any integer by 2? persistent   2  1559
write a short note on Overloading of Binary Operator?    2  2599
what is polymorphism?    4  1484
difference between class and object magic-soft   9  2161
What is the expansion of OOPS? tcs   24  6333
which is best institue to learn C/C++ IN AMEERPET OR MAITHRIVANAM OR SR NAGAR, PLEASE HELP. THANKS IN ADVANCE    5  1296
why freind function takes more parameter than normal member function in c++? ibm   1  1159
Why static Function is used in C++? tcs   4  2387
i have to create a view in SQL as like in ORACLE DATA EXPRESS EDITION cts   2  664
what is data abstraction with example.    1  1201
E-Mail New Answers        Answer Selected Questions       
Prev    1   ... 7   ... 13   ... 19   ... 25    30   [31]    32  ... 37   ... 43   ... 49   ... 55   ... 61   ... 67   ... 73    Next
 
 
 
 
 
Un-Answered Questions
 
 Question Views   Select
 
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception). 292
write a program to convert a decimal number in to its equivalent binary number? 323
how to explain our contribution in the project? 186
What is nutshell in programming language? 2136
Please send ford technologies placement paper 2 my mail id 292
Question 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. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: 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. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation 316
i want a road rash 3d game code if some one know please help me 673
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works? 155
class type to basic type conversion 314
How to Increment the value of the empid E001 for each and every employee by using the programe? 235
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers) 217
write string class as your own class in java without using any built-in function 349
#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals. 189
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there? 480
can inline function declare in private part of class? 459
E-Mail New Answers        Answer Selected Questions