strings using while loop

 #include<stdio.h>

int main()
{
    char a[]="hello";
    char *ptr=a;
    while(*ptr!='\0')
    {
    printf("%c",*ptr);
    ptr++;

}
}

Comments