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++ >> OOPS
 
Suggest New Category 
 


 

Question Asked @ Answers Views     Select
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  204
What is the difference between class and object? heinz   4  527
#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  188
#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  174
#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  177
write a programe to calculate the simple intrest and compund intrest using by function overlading    0  246
officer say me - i am offered to a smoking , then what can you say    0  196
to find out the minimum of two integer number of two different classes using friend function    0  176
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?    2  511
any one please tell me the purpose of operator overloading amazon   0  372
can inline function declare in private part of class?    1  456
What Is a Polymorphism? How many types of polymorphism and whats that use in application?    2  535
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??    1  629
define oops concept with example cap-gemini   0  221
Is this job good for future? can do this job post grduate student?    0  212
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
 
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()? 631
Write a program to reverse a string using recursive function? 344
any one please tell me the purpose of operator overloading 372
Please send ford technologies placement paper 2 my mail id 292
what is difference between class template and template class? 15
what are the different types of qualifier in java? 254
Will I be able to get a picture in D drive to the c++ program? If so, help me out? 191
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required) 2078
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me. 313
What is nutshell in programming language? 2129
How to use CMutex, CSemaphore in VC++ MFC 1059
to find out the minimum of two integer number of two different classes using friend function 176
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer 220
program for insertion ,deletion,sorting in double link list 466
diff between Virtual mathod and abstract method? 357
E-Mail New Answers        Answer Selected Questions