Usually the basic libs, say libc.a, are included in your link automagically so you may not see an explicit reference in the commands to build an executable... or you might see something cryptic like "-lc"... To get to the functions in that library the C compiler may require you to include a header file which declares their signatures -- name, arguments, and return value.
Memory types like int and double are part of the language not the machine. A particular piece of hardware may have instructions to manipulate 1,2,4,and 8 byte quantities and interpret them as signed or un-signed collections of bits, as well as dealing with 4 or 8 byte lumps as floating-point values. But the language and it's compiler decide to call them ints and doubles and know how to allocate memory for them and use them appropriately. The fact that C's ints and doubles usually look identical to the hardware's registers and FP values derives from C being a very low level language. Java's Integer class is arithmetically identical to C's int, but way more complicated in it's implementation.
The point about memory allocation is that the program asks the system for a page of memory -- that's a syscall -- and then uses some local library functions to divide -- or allocate -- that memory into lumps that it can use. There are really three ways to do this in a C program, and all of them reflect common aspects of the hardware. You can do:
1. int x; outside of a function definition. This makes the compiler set aside 4 or so bytes in a "global" memory area that is allocated when the program is first loaded into memory.
2. int y; _inside_ a function definition. This makes the compiler set aside bytes on the program stack, which has been allocated at load time and changes size as needed.
3. your create_memory_with_os(2 bytes, double_store(argument)); which looks like a fancy way to say C's malloc() (actually malloc() is user level but I forget the syscall that gets new pages, so let's just pretend this is that...). This calls into the internals and returns a chunk of memory for the program to use that is neither in the pre-initialized area nor the stack.
Also hidden in the seemy underside of your program is some statup code that does all the stack and program area allocations, initializes everything, and then calls main(). That gets included in every link without much ado as well, although there is probably a way to override it.
I'm not sure where to send you to get more under-the-covers information. I tried googling "C language internals" and "C language startup" but didn't have the patience to dig very deep. This page has a bit of description of memory layout and how a program gets executed, but it's part of an embedded programming tutorial so it might be not the focus you want:
http://www.bravegnu.org/gnu-eprog/c-startup.html But I'm sure that following some of those other links will cause you to stumble on the right thing.