1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
void print_msg_b();

static const char* WEIRDEST_FOOD_I_CAN_THINK_OF = "pickles";

// static ▒ means that this variable (or function) is accessible only
// in the current file.

/*
const char* WEIRDEST_FOOD_I_CAN_THINK_OF = "pickles";
$ gcc -o static_const static_const_{a,b}.c
/tmp/cctjAV59.o:(.data+0x0): multiple definition of `WEIRDEST_FOOD_I_CAN_THINK_OF'
/tmp/cc1s4fyF.o:(.data+0x0): first defined here
collect2: error: ld returned 1 exit status
*/

© Copyright 2019 Alexander J. Quinn         This content is protected and may not be shared, uploaded, or distributed.