#include <stdio.h>
#include <stdlib.h>
struct my_info
{
char name[10];
int age;
char home_town[10];
char school[10];
char college[10];
char versity[10];
char life_style[10];
};
void biodata(struct my_info bio);
int main()
{
struct my_info koushik;
printf("Please enter your name:");
scanf("%s",&koushik.name);
printf("Please enter your age:");
scanf("%d",&koushik.age);
printf("Please enter your home town:");
scanf("%s",&koushik.home_town);
printf("Please enter your school:");
scanf("%s",&koushik.school);
printf("Please enter your college name:");
scanf("%s",&koushik.college);
printf("Please enter your versity name:");
scanf("%s",&koushik.versity);
printf("Please enter your life_style:");
scanf("%s",&koushik.life_style);
biodata(koushik);
return 0;
}
void biodata(struct my_info bio)
{
printf("\n-------------------------------------\n");
printf("koushik ahamed kushal's biodata:");
printf("\n-------------------------------------\n");
printf("\nNAME:%s\n",bio.name);
printf("\nAGE:%d\n",bio.age);
printf("\nHOME TOWN:%s\n",bio.home_town);
printf("\nSCHOOL:%s\n",bio.school);
printf("\nCOLLEGE:%s\n",bio.college);
printf("\nUNIVERSITY:%s\n",bio.versity);
printf("\nLIFE-STYLE:%s\n",bio.life_style);
printf("\n-------------------------------------\n");
}
output type:
No comments:
Post a Comment