What is the function of "static" in C program?


  • 1
    S

    Question from Marvel.
    I was asked this question in the telephone interview, I was applying embedded system software developer.
    Actually there are 3 functions,
    1, used before a function, to make the function invisible outside of the source code file
    2, used before a local variable, to make the variable as a "single" variable, and keep the value all the time
    3, used before a global variable, to make it invisible outside of the source code file


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.