Write a C program to print your name, date of birth, mobile numbers and university’s name on separate line.
#include <stdio.h>
// Driver code
int main() {
char name[50];
char dateBirth[50];
char mobileNumbers[50];
char universityName[50];
printf("Enter your name: ");
scanf("%s",name);
printf("Enter your date of birth: ");
scanf("%s",dateBirth);
printf("Enter your mobile numbers: ");
scanf("%s",mobileNumbers);
printf("Enter your university's name: ");
scanf("%s",universityName);
printf("\nYour name: %s\n",name);
printf("Your date of birth: %s\n",dateBirth);
printf("Your mobile numbers: %s\n",mobileNumbers);
printf("Your university's name: %s\n",universityName);
getchar();
getchar();
return 0;
}
Comments
Leave a comment