Tuesday, 3 January 2012

Void-Data Type

The void keyword allows us to create functions that either do not require any parameters or do not return a value.
#include <stdio.h>
void Print_Square(int Number);
void main ()
{
   Print_Square(5);
   exit(0);
}
void Print_Square(int Number)
{
   printf("%d squared is %d\n",Number, Number*Number);
}

No comments:

Post a Comment

host gator coupon