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

Why void main is used in c?

559


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

729


What are variables and it what way is it different from constants?

786


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1520


What is the use of ?: Operator?

664






please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1327


Can you please compare array with pointer?

615


Differentiate between ordinary variable and pointer in c.

615


What is the use of void pointer and null pointer in c language?

625


What is the function of multilevel pointer in c?

670


What is action and transformation in spark?

594


Write a program to show the change in position of a cursor using c

580


If null and 0 are equivalent as null pointer constants, which should I use?

577


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

1709


What are the standard predefined macros?

633