Why static Function is used in C++?

Answer Posted / rafiuddin

static functions can be called with out the class object
also. we can call static functions with scope resulation
operator.

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 inheritance in simple words?

712


What are the 3 principles of oop?

714


How do you use inheritance in unity?

680


How do you define social class?

681


What is overloading and its types?

704






write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1868


What is polymorphism in oops with example?

641


What is difference between pop and oop?

701


Which language is not a true object oriented programming language?

750


What is encapsulation in simple terms?

638


what type of questions

1782


What are the 5 oop principles?

692


What is difference between abstraction and encapsulation?

691


#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

2167


What is advantage of inheritance?

777