This program is not terminating. Can anyone tell me what is the problem with the code.
#include<Stdio.h>
#include<String.h>
void main()
{
int i=0;
char str1[10];
clrscr();
printf("Enter string1");
scanf("%s",str1);
for(i=0;str1!='\0';i++)
{
printf("%d",i);
}
getch();
}
Is that all strings end with the null character '\0'