Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
string_ptr_to_fct_param
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//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; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.24 sec, absolute running time: 0.31 sec, cpu time: 0.22 sec, memory peak: 3 Mb, absolute service time: 0,56 sec
edit mode
|
history
|
discussion
a=6, b=100, c=6, str:Hello!Good luck!