I would like to store 2 variables into char array, and print our the first one as shown below.
const char *a;
a = getCapital(bufferStore); //"Australia"
a = getCurrencyCode(bufferStore); "9876.00"
stdout, which is what
printf writes to, is by default line buffered. That means everything you write to it is buffered, i.e. stored in memory, and is flushed (and actually printed) when you print a newline.