No argument no return type(NANR):
A “no argument, no return type” function, also known as a void function with no parameters, is a type of function in programming that does not take any arguments and does not return any value.
Here’s the definition syntax for a no argument no return type function in C:
void function_name() { // Function body – code block where the functionality of the function is defined // You can perform operations, calculations, etc. here }
Example:
//ADDITION OF RWO NUMBER BY USING –
// NO ARGUMENT NO RETURN TYPE(NANR)
#include<stdio.h>
void add()
{
int a=10 , b=20 , sum;
sum=a+b;
printf(“%d”,sum);
}
int main()
{
add();
return 0;
}
OUTPUT:-
30