PROGRAM FOR MACROS EXAMPLE 1
#define NULL 0
void main()
{
char st[20];
int i;
puts("Enter a
string:");
gets(st);
for(i=0;st[i]!=NULL;i++);
printf("length=%d",i);
}
OUTPUT:
Enter a string:
Sirisha
Length=7
No comments:
Post a Comment