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
What is the difference between class and object? heinz   4  498
#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  182
#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  169
#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  170
write a programe to calculate the simple intrest and compund intrest using by function overlading    0  244
officer say me - i am offered to a smoking , then what can you say    0  190
to find out the minimum of two integer number of two different classes using friend function    0  174
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?    2  497
any one please tell me the purpose of operator overloading amazon   0  366
can inline function declare in private part of class?    1  446
What Is a Polymorphism? How many types of polymorphism and whats that use in application?    2  530
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??    1  615
define oops concept with example cap-gemini   0  216
Is this job good for future? can do this job post grduate student?    0  211
c++ provides classes...and classes do what we want but why then strcut are used...if we say data hiding... it is also provided by c++ in structs then why to prefer clasess tcs   1  458
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
 
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box 297
c++ program to swap the objects of two different classes 150
write a programe to calculate the simple intrest and compund intrest using by function overlading 244
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required. 776
how to find the correct email address format by using the programe? 434
what are the realtime excercises in C++? 306
when to use 'mutable' keyword and when to use 'const cast' in c++ 193
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!) 360
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? 150
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash 191
Why is it so that we can have virtual constructors but we cannot have virtual destructors? 794
what is graphics 190
class type to basic type conversion 308
What is interface? When and where is it used? 229
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it. 6
E-Mail New Answers        Answer Selected Questions