Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
string_ptr_to_fct_param
//gcc 5.4.0 #include <stdio.h> int c; typedef struct { int a; int b; char str[]; }str_samp; str_samp sample, *sptr; int func(int *a, char *rstr) { *a=6; strcpy(rstr,"Hello"); *(rstr+5)='!'; strcat(rstr,"Good luck."); *(rstr+15)='!'; return(*a); } int main(void) { sample.a=50; sample.b=100; sptr = &sample; c=func(&sptr->a,sptr->str); printf("a=%d, b=%d, c=%d, str:%s", sample.a, sample.b, c, sptr->str); return 0; }
run
|
edit
|
history
|
help
0
My first reevers C 2darryp
PtStrCpy
11
Lp
20171103_Digitos
C Array Demonstration
Linked List demo in C
PuntosTriangulo
test
18BCE2182 ASSESS_1 Q2-2