1. Write a C program to print your name, date of birth, mobile numbers and university's name on separate line.
#include <stdio.h>
int main()
{
char name [50];
char dateofbirth [50];
char mobilenumber [50];
char universityname [50];
printf("\nEnter your name: ");
scanf("%s",name);
printf("\nEnter your date of birth: ");
scanf("%s",dateofbirth);
printf("\nEnter your mobile number: ");
scanf("%s",mobilenumber);
printf("\nEnter your university name: ");
scanf("%s",universityname);
printf("\nName: %s",name);
printf("\nDate of birth: %s",dateofbirth);
printf("\nMobile number: %s",mobilenumber);
printf("\nUniversity name: %s",universityname);
return 0;
}
Comments
Leave a comment