Header Ads Widget

Ticker

6/recent/ticker-posts

No Return With No Arguments In Function C language . ( with example )


function in C language ( No Return No Arguments )

syntax:

     void name();

void refers to no return in c languages.

|| in no return no argument there no value retuen llike return sum; 

only call in function used..

example:

write a function  to sum of two numbers .

#include<stdio.h>

void sum();

void main()

{

    sum();


}

   void sum ()

    {

        int a,b,c;

        printf("Enter two  number :");

        scanf("%d%d",&a,&b);

        c=a+b;

        printf("sum :%d",c);

    }





Post a Comment

0 Comments