skip to main |
skip to sidebar
Pointer and String
#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