Skip to content

Instantly share code, notes, and snippets.

@ifduyue
Created April 18, 2014 09:45
Show Gist options
  • Save ifduyue/11034746 to your computer and use it in GitHub Desktop.
Save ifduyue/11034746 to your computer and use it in GitHub Desktop.
#include <stdio.h>
struct A {
int a;
char b;
};
struct A foo() {
struct A a;
a.a = 3;
a.b = 'c';
return a;
}
int main() {
struct A b = foo();
printf("%d %c\n", b.a, b.b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment