Computer Fundamentals

Q1: A memory that does not change its contents without external causes is known as

A Dynamic memory

B Static memory

C RAM

D EEPROM

E None of the above

ANS:B - Static memory

Static Allocation means, that the memory for your variables is automatically allocated, either on the Stack or in other sections of your program. You do not have to reserve extra memory using them, but on the other hand, have also no control over the lifetime of this memory.

Example: A variable in a function, is only there until the function finishes.

Dynamic memory allocation is a bit different. You now control the exact size and the lifetime of these memory locations. If you don't free it, you'll run into memory leaks, which may cause your application to crash, since it, at some point cannot allocation more memory.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.