সম্পাদনা
#include <stdio.h> #include <string.h> int main() { char source[20] = "hello world"; char target[20]; strncpy(target, source, 5); target[5] = '\0'; printf("%s", target); return 0; }
পূর্বরূপ