मराठी

What is the difference between static and dynamic allocation?

Advertisements
Advertisements

प्रश्न

What is the difference between static and dynamic allocation?

फरक स्पष्ट करा
Advertisements

उत्तर

Static Allocation Dynamic Allocation
Memory is allocated at compile time. Memory is allocated at runtime.
The size of memory is fixed and cannot be changed during execution. The size of memory can be changed during execution as required.
It is faster but less flexible. It is more flexible but may be slower.
Example: Normal array declaration int a[10]; Example: Dynamic memory allocation using objects in Java like new int[10];
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Arrays - One Dimension - Exercises [पृष्ठ १७४]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 7 Arrays - One Dimension
Exercises | Q 2. (iii) | पृष्ठ १७४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×