Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(){
- char src[10] = "";
- char dest[10] = "hello";
- strcpy(dest, src);
- for(int i = 0; i < 10; ++i){
- printf("%3d [%c]\n", src[i], src[i]);
- }
- printf("\n\n");
- for(int i = 0; i < 10; ++i){
- printf("%3d [%c]\n", dest[i], dest[i]);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment