Skip to content

Instantly share code, notes, and snippets.

@gammy
Created January 15, 2016 15:56
Show Gist options
  • Save gammy/b5c2e841092b33f04171 to your computer and use it in GitHub Desktop.
Save gammy/b5c2e841092b33f04171 to your computer and use it in GitHub Desktop.
// How the hell does this work?
// gcc --std=c99 -Wall -pedantic t.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int main(int argc, char *argv[]) {
uint32_t num_ipd_intervals = atoi(argv[1]);
uint32_t ipd_interval[num_ipd_intervals + 1];
printf("num_ipd_intervals(argv): %u\n"
"Sizeof ipd_interval: %lu\n",
num_ipd_intervals,
(size_t) sizeof(ipd_interval));
return(0);
}
@gammy
Copy link
Author

gammy commented Jan 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment