returntype functionName(datatype args1,datatype args2,...) { Statements --------------- return value ; }
#include⁢stdio.h> void address() { printf("CCIT\n"); printf("Rajapeth\n"); printf("Amravati\n"); } main() { printf("Address of CCIT is "); address(); printf("Address of Choudhari Sir is\n"); address(); }
Address of CCIT is CCIT Rajapeth Amravati Address of choudhari sir is CCIT Rajapeth Amravati
#include⁢stdio.h> void star() { int i; for(i=0;i<=25;i++) printf("*"); } main() { printf("CCIT\n"); star(); printf("\nAmravati\n"); star(); }
CCIT ************************* Amravati *************************
#include⁢stdio.h> void display() { int i; for(i=1;i<=100;i++) printf("%d ",i); } main() { printf("Number is \n"); display(); }
#include⁢stdio.h> void odd() { int i; for(i=1;i<=100;i=i+2) printf("%d ",i); } main() { printf("Odd nos. are \n"); odd(); }