TOP CATEGORIES

×

What are Static Functions in C?

K

Kimsha Mike

The answer of the "What are the static functions in C" is simple the static functions use static keyword in C programing that are have internal linkage.

Key characteristics and uses of static functions

  • Scope Limitation 
  • Internal Linkage
  • Encapsulation
  • Avoiding Name Collisions
  • Optimization
  • Declaration

For Example of static Function in C

#include <stdio.h>

static void staticFunction() {

    printf("This is a static function. \n");

}

void publicFunction() {

    printf("This is a public function. \n");

    staticFunction();

}

0 votes

Your Answer