How to access Global Variables in C <p>I am trying to populate global variables but it seems to not be working . Here is my code .</p> <pre><code>typedef struct Global_ { char values[3][40] }Global_t; //function file GBL_PTR = calloc (1, sizeof (Global_t)); memset(GBL_PTR.values,'\0',sizeof(GBL_PTR.values)); //opening a file and reading it sscanf(linebuf, "List of values %s , %s \n", GBL_PTR.values[0], GBL_PTR.values[1]); printf("Why dont i see these logs %s",GBM_PTR.values[1]); </code></pre> <p>I don't see any crashes , just no logs. The compiles fine. I am new to C, can someone let me know what am I missing here. The main idea is to access a global variable from my function. How do I do it?</p>