As the memory segments are part of Linux operating system, is it possible to view their respective addresses using simple C program or any linux commands.
If you wrote a program and you want to see its memory mapping when it's running, you can run it in a debugger like
gdb, then start it, and take a look at the memory map with the command
info proc mappings, the output will be something like this:
(gdb) info proc mappings process 6520 Mapped address spaces: Start Addr End Addr Size Offset objfile 0x10000 0x15000 0x5000 0x0 /bin/true 0x24000 0x25000 0x1000 0x4000 /bin/true 0x25000 0x26000 0x1000 0x5000 /bin/true 0x76e6e000 0x76f98000 0x12a000 0x0 /lib/arm-linux-gnueabihf/libc-2.24.so ... etc ... 0x7efdf000 0x7f000000 0x21000 0x0 [stack] 0xffff0000 0xffff1000 0x1000 0x0 [vectors]
If you instead want to see the mappings of an already running process you can, assuming that you have the right permissions, do
cat /proc/<pid>/maps. In alternative you could attach to the process with
gdb -p <pid> and do what I explained above.