because if you hard drive or monitor crashes it will save on the hard disk.
It must be loaded into RAM and assigned memory addresses
It must be loaded into RAM and assigned memory addresses
It must be loaded into memory. Then, if it uses dynamic binding, it must be bound to its imported symbols.
Program data can be stored in the program's data segment, on the stack or on the heap. Constants, static variables and global variables are always stored in the program's data segment. Local variables are always stored on the stack. Dynamic variables are always stored on the heap. User data is typically stored in files, but those files could exist literally anywhere, such as a local hard-disk drive, a file-server or "the cloud". However, data must be brought into working memory in order to operate upon it. Small amounts of data can be allocated within the data segment via static variables but generally you will use the heap. If the data is too large to fit into working memory all at once, use one or more temporary files on one or more local hard-disk drives and pull in what you need as and when you need it.
If the computer cannot recognize an external hard disk, it would be virtually impossible to format it. There must be a problem with the hard disk. Consider replacing it or taking it ti where you bought it.
PROGRAM
binary
Data is actually stored in various places in a computer, mostly determined by how quickly it must be accessed:internal CPU registers for the data actually being processed nowcache memory for data that has been recently accessed that is likely to need to be accessed again soonmain memory (RAM) for data that will need to be available whenever neededvirtual memory (in a file on the hard disk) for data that is rarely needed but can be copied into main memory when neededinput/output files (on hard disk) for data that the program will need for the current job and for result data from the current job
Yes, it must partitioned and formatted.
The computer hard disk and CPU have completely different purposes. Your question asks "or", so I will tell you that the hard disk stores data and programs. Having answered that the "or" means I must not tell you what the CPU does.
you must store it to the hard drive
the right place on the hard disk has to be found, then the read/write head must be placed there, then the sector (a small part of the hard disk) is read or written, if it's read, the data is moved into the memory, maybe by the DMA (Direct Memory Access) Controller. Is it's a write operation, the data must first be given to the Hard Disc Controller.