#include<stdio.h>
#include<conio.h>
void main()
{
char name[25];
clrscr();
printf("enter ur name");
scanf("%s",name);
printf("%s",name);
getch();
}
--Here base add of array is passed to scanf() fx.
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char name[25]={'i','n','d','i','a','n','\0'};
int i=0;
clrscr();
while(name[i]!='\0')
{
printf("%c",name[i]);
i++;
}
getch();
}
No comments:
Post a Comment