Wednesday, July 3, 2019

strcpy in c language

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


int main()
{
    char str1[10]= "hello";
    char str2[10];
    char str3[10];
    strcpy(str2, str1);
    strcpy(str3, "world");
    puts(str2);
    puts(str3);
    return 0;
}

No comments:

Post a Comment

python class topic video