We want a function that each time is called returns a character according to times called.
eg.
Called 1st time: will return ‘a’
Called 2nd time: will return ‘b’
Called 3rd time: will return ‘c’
.
.
.
Called 26th time: will return ‘z’
Called 27th time: will return ‘a’
and so on….
1 2 3 4 5 6 7 | int f(void){ static char ch ='a'-1; if(ch=='z') ch='a'-1; ch++; return ch; } |
