#include<stdio.h>
void main()
{
char n[]="hello";
char *p=&n[0];
int len=0;
clrscr();
while(*p!='\0')
{ if(*p=='\0')
break;
len++;
p++;
}
printf("Length is : %d",len);
getch();
}
void main()
{
char n[]="hello";
char *p=&n[0];
int len=0;
clrscr();
while(*p!='\0')
{ if(*p=='\0')
break;
len++;
p++;
}
printf("Length is : %d",len);
getch();
}
No comments:
Post a Comment