C Online Compiler
Example: Hello World Program in C Using a User-defined Function
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// HELLO WORLD PROGRAM IN C USING A USER-DEFINED FUNCTION #include <stdio.h> // Function to display messages void showMessage() { printf("C HELLO WORLD PROGRAM\n"); printf("HELLO, WORLD!\n"); } int main() { // Call the showMessage() function to print the messages showMessage(); return 0; }
Output
Clear
ADVERTISEMENTS