C program with the use of strlen() function.

Use of strlen() Function.

In this post, I had shared a program with the use of strlen() function.

strlen() is a string function which gives the length of the string in form of output.

Let us check the code :)





#include <stdio.h> 
#include <conio.h>
#include <string.h> 
void main()
{
  int a;
  char s[10];
  clrscr();
  printf("Enter string: ");
  gets(s);
  a=strlen(s);
  printf("\nLength of the string: %d",a);
  getch();

}








Happy coding :)

Comments

Popular posts from this blog

MultiSelection of Item in Recycler View

Upload Image From Android To Php Server

Merge Sort