Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Lab 9 v0.5
joseph triangle
Volume of a square pyramid With functions
First program.c
strend
C_141127_Matriz01
C_141126_ArrayMayorMenor02
pseudo hw v1
challoc
Spring 2017 Project 2 v1.2
Please log in to post a comment.