Skip to content

Instantly share code, notes, and snippets.

@devendranaga
Created July 2, 2015 05:11
Show Gist options
  • Save devendranaga/c1d349b1615397e2b559 to your computer and use it in GitHub Desktop.
Save devendranaga/c1d349b1615397e2b559 to your computer and use it in GitHub Desktop.
reset struct without using memset
#include <stdio.h>
struct test_ {
int a;
char string[20];
};
int main(void) {
struct test_ test_ = {};
printf("%d %s\n", test_.a, test_.string);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment