But in this case it return garbage value.....
main()
{
int x,count;
char y[10];
for(x=0;x<10;x++)
count+=scanf("%c",&y[x]);
printf("%d",count);
}
Type: Posts; User: veera
But in this case it return garbage value.....
main()
{
int x,count;
char y[10];
for(x=0;x<10;x++)
count+=scanf("%c",&y[x]);
printf("%d",count);
}
number of characters entered
hai.. I am new one to C. the following code makes infinite loop ...!! how it happen..
main()
{
int x;
char y[10];
for(x=0;x<10;x++)
x=scanf("%c",&y[x]);
printf("%d",x);