Write your own functions. We know the programs we have seen before that is included only one function: main ( ) . But we can use one more prototype functions. How to use prototype function I just shown below.
#include<stdio.h>
void func1(void);
void func2(void);
void func3(void);
int main(void)
{
printf(" What is your name: ?\n");
func1();
printf(" Where are you from: ?\n");
func2();
printf(" What is your university name: \n");
func3();
return 0;
}
void func1(void)
{
printf(" My name is: Suruj \n");
}
void func2(void)
{
printf(" I am from Kushtia \n");
}
void func3(void)
{
printf(" United International University (UIU). \n");
}
Output |
#include<stdio.h>
int main()
{
printf(" What is your name: ?\n\n");
func1();
return 0;
}
void func1(void)
{
printf(" My name is: Suruj. \n");
}
Output |
[N.B: If any body have any kinds of problem, then you can comment below. Thank you ]
No comments:
Post a Comment