difference between static and non-static variables?

Answer Posted / sujitha.r

Static:
*No instance is required.
*Automatic Invocation.

Non-Static:
*Instance is required.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is this pointer in oop?

794


What is abstraction in oop with example?

856


Which language is not a true object oriented programming language?

868


Can we create object of abstract class?

823


What is multilevel inheritance in oop?

766


What are the 3 pillars of oop?

864


#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.

3518


What are classes oop?

789


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1978


What causes polymorphism?

819


what is difference between class template and template class?

2397


What are main features of oop?

872


What is the diamond problem in inheritance?

818


What is methods in oop?

745


Advantage and disadvantage of routing in telecom sector

1022