C – Static Storage class

C – Static Storage class 2017-07-25T15:20:29+00:00

Static storage class :

A variable is declared to be static by prefixing its normal declaration with the keyword static, is called as static storage class.
static int a;
since the property of a variable may be stated in any order we could also use
int static a;

Static variables can be  declared within a function. These variables retain their values from the previous call. i.e., the value that they had before returning from the function.

C – STATIC STORAGE CLASS EXAMPLE PROGRAM

Output :

How many fibonacci number?

5

The first 5 fibonacci numbers are

1            1           2           3           5

Prev Next