what is the definition of incapsulation
Answers were Sorted based on User's Feedback
Answer / dipraj shahane
Encapsulation is binding code and data together. In Class we
are binding data (member variable) to code (member function).
Class is implementing encapsulation feature.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / arun
Wrapping up of data and methods in to a single entity is known as encapsulation
| Is This Answer Correct ? | 3 Yes | 0 No |
Write a program to get the binary tree.
What is encapsulation example?
What is an example of genetic polymorphism?
What are virtual classes?
• What are the desirable attributes for memory managment?
Why is object oriented programming so hard?
Write a program to reverse a string using recursive function?
#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.
When not to use object oriented programming?
When will a constructor executed?
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.
what i oops concept, how many languages supports oops concept?