C language

From Bitnami MediaWiki
Revision as of 17:20, 18 March 2022 by User (talk | contribs) (Created page with " <syntaxhighlight lang=C> void increment(void) { static unsigned int counter = 0; counter++; printf("%d", counter); } int main(void) { for (int i = 0; i < 5; i++) {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
void increment(void) {
  static unsigned int counter = 0;
  counter++; 
  printf("%d", counter);
}

int main(void) {
  for (int i = 0; i < 5; i++) {
    increment();
  }
  return 0; 
}