primary memories like ram and ROM are used for storing datas while working and this datas are temporary because of the factors like immediate power loss.so the datas must be saved in the secondary storage devices like hard disk in order to use it again.
Chat with our AI personalities
It is called the main memory (RAM, CACHE, SDRAM, RDRAM, DRAM) etc. which sotes the data temporarily as the computer is still on
once the system is turned off, all its contents are also lost.
Temporary memory is just normal memory but is only required temporarily. For instance, when a function is called, arguments (variables) may be passed to it. Memory may need to be set aside (allocated) to cater for those arguments, but the memory is only used temporarily. The memory is automatically released when the function returns to the caller.
A similar situation occurs when you have a large block of memory (an array) and need to make it bigger to accommodate new elements. If there's not enough free space to enlarge the block, a new allocation must be made. Thus two blocks are allocated. However, the original block is only temporary. Once all data has been copied over from the original block, the original block can be released.
RAM (random access memory)
if you opened a program on your computer, that information would be stored by the RAM, and given to the Hard Drive for you to use, once you close of the program, the information that is stored in the RAM will be lost.