Default function


Function with no arguments and no return values.

Syntax:-
for-loop-shineskill

W.A.P for function with no arguments and no return values.

#include<stdio.h>
#include<conio.h>
  void sum();
  void main()
 {
   sum();
   getch();
 }
   void sum()
 {
   int a ,b,s;
   printf(“enter Two no\n”);
   scanf(“%d%d”,&a,&b);
   s=a+b;
   printf(“%d”,s);
 }

Function with no arguments and return values.

Syntax:-
for-loop-shineskill

W.A.P for function with no arguments and return values.

 #include<stdio.h>
 #include<conio.h>
   int sum();
   void main()
  {
   int c;
   c=sum();
   printf(“%d”,c);
   getch();
  }
   int sum()
  {
   int a ,b,s;
   printf(“enter Two no\n”);
   scanf(“%d%d”,&a,&b);
   s=a+b;
   return s;
  }