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
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
 Categories >> Software >> Programming Languages >> C++ >> OOPS
 
Suggest New Category 
 


 

Question Asked @ Answers Views     Select
c++ program to swap the objects of two different classes    0  173
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).    0  216
What is the difference between class and object? heinz   4  571
#include #include #include #include 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.    0  196
#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort    0  179
#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort    0  185
write a programe to calculate the simple intrest and compund intrest using by function overlading    0  258
officer say me - i am offered to a smoking , then what can you say    0  202
to find out the minimum of two integer number of two different classes using friend function    0  184
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?    2  549
any one please tell me the purpose of operator overloading amazon   0  387
can inline function declare in private part of class?    1  489
What Is a Polymorphism? How many types of polymorphism and whats that use in application?    2  558
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??    1  664
define oops concept with example cap-gemini   0  233
E-Mail New Answers        Answer Selected Questions        Post New oops Questions
Prev     1   [2]    3  ... 7   ... 10   ... 13   ... 16   ... 19   ... 22   ... 25   ... 28   ... 31   ... 34   ... 37    Next
 
 
 
 
 
Un-Answered Questions
 
 Question Views   Select
 
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION? 158
what's the basic's in dot net 229
What is interface? When and where is it used? 244
c++ program to swap the objects of two different classes 173
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element). 216
Get me a number puzzle game-program 304
Plese get me a perfect C++ program for railway/airway reservation with all details. 927
write a program to find 2 power of a 5digit number with out using big int and exponent ? 306
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’. 319
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). 301
what is difference between class template and template class? 39
is there any choice in opting subjects like 4 out of 7 220
Why is it so that we can have virtual constructors but we cannot have virtual destructors? 824
Objective The objective of this problem is to test the understanding of Object-Oriented Programming (OOP) concepts, in particular, on encapsulation. Problem Description Create a program for managing customer’s bank accounts. A bank customer can do the following operations: 1. Create a new bank account with an initial balance. 2. Deposit money into his/her account. 3. Withdraw money from his/her account. For this operation, you need to output “Transaction successful” if the intended amount of money can be withdrawn, otherwise output “Transaction unsuccessful” and no money will be withdrawn from his/her account. Input The input contains several operations and is terminated by “0”. The operations will be “Create name amount”, “Deposit name amount”, or “Withdraw name amount”, where name is the customer’s name and amount is an integer indicating the amount of money. There will be at most 100 bank accounts and they are all created on the first month when the bank is opening. You may assume that all account holders have unique names and the names consist of only a single word. Output The output contains the transaction result of withdrawal operations and the final balance of all customers after some withdrawal and deposit operations (same order as the input). Sample Input Create Billy 2500 Create Charlie 1000 Create John 100 Withdraw Charlie 500 Deposit John 899 Withdraw Charlie 1000 0 186
Get me an image implementation program. 199
E-Mail New Answers        Answer Selected Questions