How is it possible to take part of a char and place it in a other char like
this code is ofcause not working...Code:#include <stdio.h> #include <unistd.h> int main() { char cpr1[20] = "This is a test"; char cpr2[5]; int i; for(i=0; i<5; i++) { cpr2[i] = cpr1[i] } }
i want the word "This" to be in cpr2. how can i do that??