Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
String copy
//gcc 5.4.0 #include <stdio.h> int strcopy(const char* source, char* dest) { int i; for(i=0; source[i]!='\0';i++) { dest[i]=source[i]; } dest[i]='\0'; return i; } int main() { int count=0; char s[100]; char d[100]; sprintf(s, "Hello!"); count=strcopy(s,d); printf("s is %s, d is %s, count=%d\n", s, d, count); return 0; }
run
|
edit
|
history
|
help
0
Null deref
3-D array sum and search
Largest and smallest
Undefined behavior
CS HW2
DUE BY TUESDAY
B_141212_RolloPunteros
C_141210_Funciones
Why &(a+1) is not allowed
es collar