//========================
//Program in C to learn strings in C, string1.c
//========================
#include<stdio.h>
int main()
{
char name[]="DannishRitchie";
int i=0;
while(name[i]!='\0')
{
printf("%c",name[i]);
i++;// If not incrementing while loop then its a infite loop as it will never reach to \0
}
return 0;
}
//Program in C to learn strings in C, string1.c
//========================
#include<stdio.h>
int main()
{
char name[]="DannishRitchie";
int i=0;
while(name[i]!='\0')
{
printf("%c",name[i]);
i++;// If not incrementing while loop then its a infite loop as it will never reach to \0
}
return 0;
}
No comments:
Post a Comment