- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
strcpy()
This function copies a string from source to destination. The function takes two string variables as arguments: the destination, and the source, then returns the updated destination variable.
strcat()
The strcat() function concatenates two strings. It appends a copy of the source string to the end of the destination string, and then returns the destination string.
strlen()
I know you have been waiting for this!!! This function calculates the length of the string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shortly you just need to know;
1. strlen() - calculates the length of string
2. strcat() - Appends one string at the end of another
3. strcpy() - Copies a string into another
I am giving you the below example of strcpy(), try it to see the result;
#include <stdio.h>
#include <string.h>
int main()
{
char str1[10]= "awesome";
char str2[10];
char str3[10];
strcpy(str2, str1);
strcpy(str3, "well");
puts(str2);
puts(str3);
return 0;
}
Please post your result that i will bring two more example for you on strcat() and strlen().

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page