Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Practica 5 fibonacci
Exploiting uninitialized variable
Project 5 v.03
cstructCricket
Lab 7 blackjack v0.5
Q1.c
No Pyramid toggle
18BCE2182 ASSESS_1 Q2-1
cstructCricPoint
blue point
Please log in to post a comment.