Function Passing no Arguments and Returning no Value

0
8
digitalample eye

Write a program to demonstrate function passing no arguments and returning no value.

Write a c program for function passing no arguments and returning no value.

C Code, 

#include <stdio.h>
#include <conio.h>

void sum (void);

void main()
{

sum();

getch();
}
void sum(void){
int add, a, b;

printf("Enter two numbers:");
scanf("%d%d",&a,&b);

add=a+b;

printf("n the sum is %d",add);
}

Output

Function Passing no Arguments and Returning no Value

LEAVE A REPLY

Please enter your comment!
Please enter your name here