From 41523df2b162a598ed3f668d7c36b901054b122b Mon Sep 17 00:00:00 2001 From: EliteTK Date: Wed, 26 Feb 2014 01:24:20 +0000 Subject: stuff --- example.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 example.c (limited to 'example.c') diff --git a/example.c b/example.c new file mode 100644 index 0000000..e643da5 --- /dev/null +++ b/example.c @@ -0,0 +1,25 @@ +#include +#include + +struct test { + int number; + char letter; + char *string; +}; + +void printstruct( const struct test * ); + +int main( int argc, char *argv[] ) { + struct test cake; + cake.number = 5; + cake.letter = 'a'; + cake.string = "Magic"; + + printstruct( &cake ); + return 0; +} + +void printstruct( const struct test * testp ) { + printf("Number: %d\nLetter: %c\nString: %s\n", testp->number, testp->letter, testp->string); + return; +} -- cgit v1.2.3-54-g00ecf