Wednesday, March 26, 2014

Hello everybody. How are you all? Hope fine and fresh by the grace of Almighty. Did you practice “Summation of two numbers in C”? Oh you don’t know about it? I’ve posted it here (http://plans-in-action.blogspot.com/2014/03/summation-of-two-numbers-in-c.html).


Now I’m going to tell you how to print your Name and address using C language. Here you have to use a data type char and variables will be string. Now follow the code given bellow.

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char *Name, *Address;
printf("Enter your Name:");
gets(Name);
printf("Enter your Address:");
gets(Address);
puts(Name);
puts(Address);
getch();
}

Try yourself and check. If you think this article will be helpful for others, please share it. Thank you very much. 

0 comments:

Post a Comment