Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


static functions

Posted on 1999-07-21
Medium Priority
Last Modified: 2010-04-15
I would like to know what is the differnce, in memory allocation and performance considerration, if I define, in the global section, a fuinction as a static or not static.
I am not going to use this function from other source file.

I am using VC++/6 and NT4/SVR

Question by:oak022097
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

Iexpert earned 150 total points
ID: 1263771
Defining a function as static only hides the function inside
the module (it can be called (linked to) from another module).

It has NO other affects, including mem or performance.

C overloads the use of static inside functions to declare
the data as global rather than the stack. but this is specific
to data.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question