Embedded Software Engineer Question:
Download Questions PDF

Explain what are the uses of the keyword static?


Static keyword can be used with variables as well as functions. A variable declared static will be of static storage class and within a function, it maintains its value between calls to that function. A variable declared as static within a file, scope of that variable will be within that file, but it can't be accessed by other files.

Functions declared static within a module can be accessed by other functions within that module. That is, the scope of the function is localized to the module within which it is declared.

Download Embedded Software Engineer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me why do we need virtual device drivers when we have physical device drivers?Please explain can structures be passed to the functions by value?