C Language

June 6, 2023

How to use user-defined functions in C Language

Program to user-defined functions in C Language


#include
void drawline(void);
int main(void)
{
   drawline(); 
    drawline();  
   return 0;
}
void drawline(void)    
{
    int i;
    for(i=1; i<=5; i++)
    printf("- ");
}

Output


- - - - - - - - - - 

by : Nadeem Khan

Quick Summary:

Program to user-defined functions in C Language copy #include void drawline(void); int main(void) { drawline(); drawline(); return 0; } void drawline(void) { int i; for(i=1; i