Example 1

 

Example 1:

 

// Functions

// No arguments and No Return Value

 

#include<stdio.h>

#include<stdlib.h>

 

void fnDisplay()

{

     printf("Hello World\n");

     printf("Welcome to Programming in C\n");

}

 

int main()

{

    fnDisplay();

    return 0;

}

 

 

 

Sample output:

 

$ gcc chk.c

$ ./a.out

Hello World

Welcome to Programming in C

$


No comments:

Post a Comment

Don't be a silent reader...
Leave your comments...

Anu