how to run a program in c code example
Example 1: can we write a program without main in c
#include<stdio.h>
#define start main
void start()
{
printf("Hello, World!!!");
}
Example 2: How to run C program using command
gcc <file-name.c> -o <output-file-name>
Example 3: how to write function in c
#include <stdio.h>
// Here is a function declaraction
// It is declared as "int", meaning it returns an integer
/*
Here are the return types you can use:
char,
double,
float,
int,
void(meaning there is no return type)
*/
int MyAge() {
return 25;
}
// MAIN FUNCTION
int main(void) {
// CALLING THE FUNCTION WE MADE
MyAge();
}