How to use function with no arguments and no return values in C Language

Function

On this page

Function

Program to use Function with Arguments and no return values in C Language

#include <stdio.h>
void displaymenu(void);
int main()
{
    int choice;
    displaymenu();
    printf("Enter your choice");
    scanf("%d", &choice);
    return 0;
}
void displaymenu(void)
{
    printf("1.Create database\n");
    printf("2.Insert new record\n");
    printf("3.Modify a record\n");
    printf("4.Delete a record\n");
    printf("5.Display all records\n");
    printf("6.Exit\n");
}

Output

1.Create database
2.Insert new record
3.Modify a record
4.Delete a record
5.Display all records
6.Exit
Enter your choice