String Copy

#include <stdio.h>
#include <string.h>

int main() {
    // String copy
    char source[] = "Hello, World!";
    char destination[20];

    strcpy(destination, source);

    printf("Source: %s\n", source);
    printf("Destination: %s\n", destination);

    return 0;
}
chevron_left
chevron_right

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website