/*using predefine function*/
#include<stdio.h>
#include<stdlib.h>
void main()
{
char string[100]; //varible string type
int len; //varible integer type to store value of string length
strcpy(string,"I am best"); //predefine function use to copy string to varible
len=strlen(string); //length of string store in variable
printf("my string is %d",len); //print length of string
}
#include<stdio.h>
#include<stdlib.h>
void main()
{
char string[100]; //varible string type
int len; //varible integer type to store value of string length
strcpy(string,"I am best"); //predefine function use to copy string to varible
len=strlen(string); //length of string store in variable
printf("my string is %d",len); //print length of string
}
No comments:
Post a Comment