Pointer and String

Thursday, 8 September 2011

#include<stdio.h>
#include<conio.h>
void main()
{
char s[10];
char *p=s;
clrscr();
printf("Enter the String\n");
gets(s);
printf("The String is\n");
for( ;*p!=0;p++)
 {
  printf("%c",*p);
 }
getch();
}


OUTPUT:


Enter the String
Tushar
The String is
Tushar









No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading