what is a static function

Answer Posted / abdur rab

Static functions in C
======================
If API's are developed using C and there are few functions
which the user of the API need not know about them, make
that function as static. The static function in C is
visible only inside the file where in it is declared and
defined.

Static functions in C++
========================
Unlike other member function, a static function is always
stuck with its class rather than the instance. The other
memeber functions are stuck with their objects.

A static function can be accessed without creating an
instance, since it is available with the class itself.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does printf does?

960


Can you define which header file to include at compile time?

784


What are the valid places to have keyword “break”?

814


What does s c mean on snapchat?

779


how should functions be apportioned among source files?

856


Explain how can I prevent another program from modifying part of a file that I am modifying?

854


a value that does not change during program execution a) variabe b) argument c) parameter d) none

959


write an algorithm to display a square matrix.

2421


What are conditional operators in C?

806


What is an operator?

841


What are register variables in c?

783


What is the difference between class and object in c?

807


How can you convert integers to binary or hexadecimal?

784


Differentiate fundamental data types and derived data types in C.

810


using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1570