BASIC STRING Operation in pointer method in C language strcpy,strncpy strcat strlen


Syntax of command used in pointer character
Size_t strlen(const char*s)
It returns the number of characters in ‘S’ not counting the terminating null character. Character indicate the variable as pointer
char *strcpy(char* dest, const char* src);
It copies source to destination string , stopping after the terminating null character has been moved
char *strncpy(char *dest,const char *src,size_t maxlen);
It copies max len character form source to destination ,truncating or null padding destination.
char *strcat(char *dest,const char *src)
It appends a copy of source to the end of destination. The length of resulting string is strlen(dest)+strlen(src).

No comments:
Write comments