#include <stdio.h>
#include <conio.h>
void prime();
void main(){
prime(); //No argument is passed to prime().
getch();
}
void prime(){
/* There is no return value to calling function main(). Hence, return type of prime() is void */
int num,i,flag=0;
printf("Enter positive integer enter to check:\n");
scanf("%d",&num);
for(i=2;i<=num/2;++i){
if(num%i==0){
flag=1;
}
}
if (flag==1)
printf("%d is not prime",num);
else
printf("%d is prime",num);
}This code snippet is for Function with no arguments and no return value In C
