What is a function in C program? code example

Example 1: what is system function in c

The system() function is a part of the C/C++ standard library. It is used to pass the commands that can be executed in the command processor or the terminal of the operating system, and finally returns the command after it has been completed.

<stdlib.h> or <cstdlib> should be included to call this function

Example 2: function in c

#include <stdio.h>

void function(){
  printf("I am a function!");
}

int main(void) {
  
  function();
}