Why static functions always uses static variables?

Answer Posted / george from psg

static function is constant to all object. In the same way
static variable is constant to all so we use static variable
in static function

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is interface in oop?

890


What does it mean when someone says I oop?

829


What is constructor in oop?

836


Why do while loop is used?

792


Why is polymorphism needed?

806


What is the important feature of inheritance?

876


What is difference between abstraction and encapsulation?

826


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

1916


explain sub-type and sub class? atleast u have differ it into 4 points?

2058


What are benefits of oop?

895


#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

2389


Whats is abstraction in oops?

849


What is polymorphism oop?

839


What is a class and object?

813


How do you achieve runtime polymorphism?

759