English

In what way is static initialisation of data type different from dynamic initialisation? - Computer Applications

Advertisements
Advertisements

Question

In what way is static initialisation of data type different from dynamic initialisation? 

Answer in Brief

Solution

  1. This method assigns a constant directly to a declared variable. When a variable is declared, it is initialised before being used in programming logic.
    • Examples: 
      int a = 0;
      float f = 0.0;
      double d = 0.0;
  2. Dynamic initialisation refers to the process of setting a variable during program execution. In this scenario, a variable is allocated based on an arithmetic operation or logical function.
    • Examples: 
      int a, b, c;
      c = a + b;
      String s1, s2, s3;
      s3 = s1 + s2
shaalaa.com
  Is there an error in this question or solution?
Chapter 1.03: Values and Data Types - EXERCISES [Page 33]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.03 Values and Data Types
EXERCISES | Q III. 10. | Page 33
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.