Steps to write your own header file in C −
int sub(int m,int n) { return(m-n); }
#include<stdio.h> #include "sub.h" void main() { int a= 7, b= 6, res; res = sub(a, b); printf("Subtraction of two numbers is: %d", res); }
After running "subtraction.c", the output will output
Subtraction of two numbers is: 1
The above is the detailed content of How to write your own header file in C language?. For more information, please follow other related articles on the PHP Chinese website!