Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <locale>
- #include<string.h>
- using namespace std;
- void copiar_D_en_C(char c[], char d[]);
- int main(void)
- {
- setlocale(LC_ALL, "Spanish");
- char c[20]="buenas", d[20]="que tal";
- copiar_D_en_C(c, d);
- cout << "contenido de c: " << c << endl;
- return 0;
- }
- void copiar_D_en_C(char c[], char d[]){
- int i=0;
- while(d[i]!='\0'){
- *(c+i)= *(d+i);
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement