WAP string length? BCA- 2sem


 WAP string length:-

#include<stdio.h>

#include<conio.h>

void main ()

{

char a [100];

int l;

printf(" enter a string\n");

gets(a);

l= strlen(a);

printf("Length of string=%d/n",l);

getch();

}

output of string length:-

enter string = string

l= 6

No comments:

Post a Comment

If you have any doubts, Please lets me know and Please Follow our Website