Computer Science SLO Based Key Point Notes
👉👉👉 Computer Science 12th Class Notes (Main Page)
************************************
Unit 5: Arrays and String
5.1.3. Initialization of Array
- To initialize an array, the initializing values are enclosed within the curly braces in the declaration and placed following an equal sign after the array name. Here is an example:
- If the number of values supplied are less than the actual number of item in the list then extra spaces in the array will be filled in with zeroes.
- If the number of values supplied is greater than the actual size of the array then the compiler will give an error message.
- If the size of the array is not supplied, the compiler will count the number of items in the initialization list and fix that as the array size. For example:
👇👇👇👇👇👇👇👇👇👇
************************************👉👉👉 Computer Science 12th Class Notes (Main Page)
************************************
(National Book Foundation - As Federal Textbook Board, Islamabad Based on National Curriculum Pakistan 2023-2024 and Onward prescribed by Federal Board of Intermediate and Secondary Education, Islamabad, and All Pakistan Boards)
(National Book Foundation - As Federal Textbook Board, Islamabad
Based on National Curriculum Pakistan 2023-2024 and Onward prescribed by Federal Board of Intermediate and Secondary Education, Islamabad, and All Pakistan Boards)
0 Comments
Note: Write me in the comments box below for any queries and also Share this information with your class-fellows and friends.