c define
#define SIZE 42
#define MSG "Hello, World!"
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();
}
functions in c programming
#include <stdio.h>
/* function return type is void and it doesn't have parameters*/
void introduction()
{
printf("Hi\n");
printf("My name is Chaitanya\n");
printf("How are you?");
/* There is no return statement inside this function, since its
* return type is void
*/
}
int main()
{
/*calling function*/
introduction();
return 0;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us