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

I need previous papers of CSC.......plz help out by posting them.......

1926


Explain pointers in c programming?

737


What is n in c?

687


What is a pointer in c plus plus?

800


What is hash table in c?

671






What are logical errors and how does it differ from syntax errors?

758


Whats s or c mean?

690


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

725


Can you please compare array with pointer?

714


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2002


Do you know null pointer?

697


Why is python slower than c?

707


What is the return type of sizeof?

696


What is a static variable in c?

770


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

2097