Saturday 24 February 2018

Write a program to print your name, date of birth, mobile number and location using "char variable" and "printf" function.

Source Code : 

#include <stdio.h> 
main() 
{

char    name[]    =   "Devendra Singh"; 
char dob[] = "18 July 1990"; 
char mobile[] = "+91-9999999999"; 
char location[] = "India"; 

printf("Name \t\t : \t %s \n", name); 
printf("DOB \t\t : \t %s \n", dob); 
printf("Mobile \t\t : \t %s \n", mobile); 
printf("Location \t : \t %s \n", location); 

getchar();

}

Output : 
Name : Devendra Singh 
DOB : 18 July 1990 
Mobile : +91-9999999999 
Location : India


Click Here to download sample file.


Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home