SlideShare a Scribd company logo
Arrays Basics
Definition :-Definition :-
• Arrays are complex variables that can hold multiple
values of the same data type.
• Array is a fixed type sequenced collection of elements of
the same data type.
• It is simply a grouping of like-type data.
• Some examples where a concept of arrays can be used :-
1) List of employees in an organization.
2) Exam scores of a class of students.
3) Table of daily rainfall data.
Origin of the Arrays :-Origin of the Arrays :-
What is the Need of anWhat is the Need of an
Array ?Array ?
• To store large number of variables of same type
under a single variable.
• Easy understanding of the program.
• It provides a convenient structure for
representing data.
• We can use arrays to perform large amounts of
data in smaller values of commands and yet we
can have proper output.
Types of Arrays :-Types of Arrays :-
• There are basically three types of arrays used in a
C programming language :-
1) One-dimensional
2) Two-dimensional
3) Multi-dimensional
One-dimensional arrays :-One-dimensional arrays :-
• The array which is used to represent and store
data in a linear form is called as single or one
dimensional array.
• A structured collection of components all of the
same type, that is given a single name.
• Each component is accessed by an index that
indicates the component’s position within the
collection.
• Array position is always started at 0 and goes up
to one less then the size
Concept :-Concept :-
• Syntax :-
<data_type>
<array_name> [size];
• Total size (in bytes):-
total size = length of
array * size of data type
• The Memory allocation
of the one dimensional
array can be
understood from the
figure.
Declaration of One-Declaration of One-
dimensional arrays :-dimensional arrays :-
• Like any other variable, arrays must be declared before
they are used so that the compiler can allocate space for
them in memory. The general form of array declaration
is :-
type variable name[ size ];
• Here in above syntax ,
1) The type specifies the type of element that will be
contained in the array, such as int, float, or char.
2) The size indicates the maximum number of elements
that can be stored in array.
3) The Variable name indicates the name you want to
assign to the array.
Example :-Example :-
1. float height [50];
In above example, it declares the height to be an
array containing of 50 real elements. Any subjects
from 0 to 49 are valid.
2. int group[10];
In above example, it declares the group as an
array to contain a maximum of 10 integer constants.
Initialization of One-dimensionalInitialization of One-dimensional
Array :-Array :-
• After the array is declared, its elements must be
initialized.
• Otherwise, they will contain junk values.
• An array can be initialized at either of the
following stages :-
1) At compile time
2) At run time
Compile time initialization :-Compile time initialization :-
• Whenever we declare an array, we can initialize
array directly at compile time.
• Initialization of an array is known as compiler
time initialization if and only if we assign certain
set of values to array element before executing
program .i.e. at compilation time.
Explanation :-Explanation :-
• Compiler counts the number of elements written
inside pair of brackets and determines the size of
arrays.
• After counting the number of elements inside the
brackets, the size of an array is declared during
complete execution.
• This type of initialization is called as “Compile
time initialization”.
Example :-Example :-
1. float total [5] = {0.0,15.75,-10}
Here in above example, we initialize the first
three elements to 0.0, 15.75 and -10 and the
remaining two values to zero.
2. char name [ ] = {‘j’, ‘o’, ‘h’, ‘n’, ‘o’}
Here in above example, declares the name to be
an array of five characters, initialized with a string
john ending with the null character.
Run time initialization :-Run time initialization :-
• An array can be explicitly initialized at run time.
• This approach is usually applied for initializing
large arrays.
• Compile-time initialization can only be done
using constant expressions, but run-time
initialization can be done using any expression at
all.
Example :-Example :-
for (i=0; i<100, i=i+1)
{
if i<50
sum [i] = 0.0;
else
sum [i] = 1.0;
}
• Here, the first 50 elements of the array “sum” are
initialized to zero while the remaining 50 elements are
initialized to 1.0 at run time.
Searching and Sorting :-Searching and Sorting :-
• Searching and sorting are two most frequent
operations performed on arrays.
• Computer scientists have devised several data
structures and searching and sorting techniques
that facilitate rapid access to data stored in lists.
• More information on these two concepts are
provided further…..
Searching :-Searching :-
• Searching is a process of finding the location of
the specified element in a list.
• The specified element is often called the search
key.
• If the process of searching finds a match for the
search key with a list element value, the search is
said to be successful, Otherwise it is unsuccessful.
• Types of searching :
1) sequential search
2) binary search
Sorting :-Sorting :-
• Sorting is a process of arranging elements in the
list according to their values, in ascending or
descending order.
• A sorted list is called a ordered list.
• Many sorting techniques are available, but the
most commonly used are 3 techniques :-
1) bubble sort
2) selection sort
3) insertion sort
Two-dimensional arrays :-Two-dimensional arrays :-
• The array which is used to represent and store
data in a tabular form is called as two
dimensional array.
• Such type of array specially used to represent data
in a matrix form.
• Examples:
1) Lab book of multiple readings over
several days
2) Periodic table
3) Movie ratings by multiple reviewers.
- Each row is a different reviewer
- Each column is a different movie
Concept :-Concept :-
• Syntax :-
<data-type>
<array_nm>
[row_subscript]
[column_subscript]
• Memory allocation of
these type of arrays
can be understood
from the figure.
Declaration of Two-DimensionalDeclaration of Two-Dimensional
Arrays :-Arrays :-
• Like any other variable, arrays must be declared before
they are used so that the compiler can allocate space for
them in memory. The general form of array declaration is
type array_name [row_size] [column_size]
• Here in above syntax ,
1) The type specifies the type of element that will be
contained in the array, such as int, float, or char.
2) The size indicates the maximum number of elements that
can be stored columns and rows in array.
3) The Variable_name indicates the name you want to assign
to the array.
Example :-Example :-
Initialization of Two-DimensionalInitialization of Two-Dimensional
Arrays :-Arrays :-
• Like one dimensional arrays, two-dimensional
arrays can be initialized by following their
declaration with a list of initial values enclosed in
brackets.
• Two-dimensional arrays may be initialized by
specifying bracketed values for each row and
column.
Example :-Example :-
Multi-Dimensional Arrays :-Multi-Dimensional Arrays :-
• C allows arrays of three or more dimensions.
• The exact limit is determined by the compiler.
• The general syntax of a multi-dimensional array is
given below :-
type array_name [s1] [s2] [s3]…….[sn];
where ‘s’ is the size of the dimension
• For example,
int survey [3] [5] [12];
float table [5] [6] [7] [8];
Arrays Basics

More Related Content

What's hot (20)

PDF
Character Array and String
Tasnima Hamid
 
PPTX
Presentation on array
topu93
 
PPTX
Arrays in Data Structure and Algorithm
KristinaBorooah
 
PPT
Arrays
SARITHA REDDY
 
PPTX
Arrays In C Language
Surbhi Yadav
 
PPTX
Array operations
ZAFAR444
 
PPTX
Sparse matrix and its representation data structure
Vardhil Patel
 
PPTX
Binary Search Tree
sagar yadav
 
PPTX
Data Structures - Lecture 3 [Arrays]
Muhammad Hammad Waseem
 
PPTX
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
PPTX
Arrays in java
Arzath Areeff
 
PDF
SPL 10 | One Dimensional Array in C
Mohammad Imam Hossain
 
PPTX
Classes, objects in JAVA
Abhilash Nair
 
PPTX
Introduction to Array ppt
sandhya yadav
 
PDF
sparse matrix in data structure
MAHALAKSHMI P
 
PPTX
Array in c++
Mahesha Mano
 
PPTX
Datastructures in python
hydpy
 
PDF
Arrays in python
moazamali28
 
PDF
Arrays In Python | Python Array Operations | Edureka
Edureka!
 
PDF
Python Variable Types, List, Tuple, Dictionary
Soba Arjun
 
Character Array and String
Tasnima Hamid
 
Presentation on array
topu93
 
Arrays in Data Structure and Algorithm
KristinaBorooah
 
Arrays In C Language
Surbhi Yadav
 
Array operations
ZAFAR444
 
Sparse matrix and its representation data structure
Vardhil Patel
 
Binary Search Tree
sagar yadav
 
Data Structures - Lecture 3 [Arrays]
Muhammad Hammad Waseem
 
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
Arrays in java
Arzath Areeff
 
SPL 10 | One Dimensional Array in C
Mohammad Imam Hossain
 
Classes, objects in JAVA
Abhilash Nair
 
Introduction to Array ppt
sandhya yadav
 
sparse matrix in data structure
MAHALAKSHMI P
 
Array in c++
Mahesha Mano
 
Datastructures in python
hydpy
 
Arrays in python
moazamali28
 
Arrays In Python | Python Array Operations | Edureka
Edureka!
 
Python Variable Types, List, Tuple, Dictionary
Soba Arjun
 

Viewers also liked (20)

PPT
Arrays
archikabhatia
 
PPT
Lecture 2a arrays
Victor Palmar
 
PPT
Array Presentation (EngineerBaBu.com)
EngineerBabu
 
PPTX
Array in c language
home
 
PDF
Data structure doubly linked list programs
iCreateWorld
 
PPTX
Doubly circular linked list
Roshan Chaudhary
 
PPT
Java control flow statements
Future Programming
 
PPTX
Doubly Linked List || Operations || Algorithms
Shubham Sharma
 
PPT
Functions in C++
Nikhil Pandit
 
PPTX
Diodes
Nikhil Pandit
 
PDF
Chapter 8 - Multiplexing 9e
adpeer
 
PPT
02 Arrays And Memory Mapping
Qundeel
 
PDF
Chapter23 friend-function-friend-class
Deepak Singh
 
PPSX
Lecture 2 data structures & algorithms - sorting techniques
Dharmendra Prasad
 
PPTX
Object as function argument , friend and static function by shahzad younas
Shahzad Younas
 
PPT
Data Structures- Part9 trees simplified
Abdullah Al-hazmy
 
PPT
Data Structures- Part8 stacks and queues
Abdullah Al-hazmy
 
PPT
Data Structures- Part2 analysis tools
Abdullah Al-hazmy
 
PPTX
Safety rules and earthing
Nikhil Pandit
 
Lecture 2a arrays
Victor Palmar
 
Array Presentation (EngineerBaBu.com)
EngineerBabu
 
Array in c language
home
 
Data structure doubly linked list programs
iCreateWorld
 
Doubly circular linked list
Roshan Chaudhary
 
Java control flow statements
Future Programming
 
Doubly Linked List || Operations || Algorithms
Shubham Sharma
 
Functions in C++
Nikhil Pandit
 
Chapter 8 - Multiplexing 9e
adpeer
 
02 Arrays And Memory Mapping
Qundeel
 
Chapter23 friend-function-friend-class
Deepak Singh
 
Lecture 2 data structures & algorithms - sorting techniques
Dharmendra Prasad
 
Object as function argument , friend and static function by shahzad younas
Shahzad Younas
 
Data Structures- Part9 trees simplified
Abdullah Al-hazmy
 
Data Structures- Part8 stacks and queues
Abdullah Al-hazmy
 
Data Structures- Part2 analysis tools
Abdullah Al-hazmy
 
Safety rules and earthing
Nikhil Pandit
 
Ad

Similar to Arrays Basics (20)

PPTX
ARRAYS.pptx
MamataAnilgod
 
PPT
Arrays
swathi reddy
 
PPTX
Unit4pptx__2024_11_ 11_10_16_09.pptx
GImpact
 
PPTX
10 arrays and pointers.pptx for array and pointer
divyamth2019
 
PPTX
Arrays.pptx
PankajKumar497975
 
PPTX
Unit 2 linear data structures
Senthil Murugan
 
PPTX
c unit programming arrays in detail 3.pptx
anithaviyyapu237
 
PPTX
MODUL new hlgjg thaybkhvnghgpv7E_02.pptx
lomic31750
 
PPTX
Programming fundamentals week 12.pptx
dfsdg3
 
PDF
Arrays
ViniVini48
 
PPT
ch06.ppt
ansariparveen06
 
PPT
ch06.ppt
chandrasekar529044
 
PPT
ch06.ppt
AqeelAbbas94
 
PPT
array Details
shivas379526
 
PPTX
Chapter-Five.pptx
berekethailu2
 
PPTX
Lesson 11 one dimensional array
MLG College of Learning, Inc
 
PPT
Data structure
Muhammad Farhan
 
PPTX
5 ARRAYS AND STRINGSjiuojhiooioiiouioi.pptx
teddiyfentaw
 
PPTX
Arrays.pptx
NavyaParashir
 
PDF
java.pdf
RAJCHATTERJEE24
 
ARRAYS.pptx
MamataAnilgod
 
Arrays
swathi reddy
 
Unit4pptx__2024_11_ 11_10_16_09.pptx
GImpact
 
10 arrays and pointers.pptx for array and pointer
divyamth2019
 
Arrays.pptx
PankajKumar497975
 
Unit 2 linear data structures
Senthil Murugan
 
c unit programming arrays in detail 3.pptx
anithaviyyapu237
 
MODUL new hlgjg thaybkhvnghgpv7E_02.pptx
lomic31750
 
Programming fundamentals week 12.pptx
dfsdg3
 
Arrays
ViniVini48
 
ch06.ppt
ansariparveen06
 
ch06.ppt
AqeelAbbas94
 
array Details
shivas379526
 
Chapter-Five.pptx
berekethailu2
 
Lesson 11 one dimensional array
MLG College of Learning, Inc
 
Data structure
Muhammad Farhan
 
5 ARRAYS AND STRINGSjiuojhiooioiiouioi.pptx
teddiyfentaw
 
Arrays.pptx
NavyaParashir
 
java.pdf
RAJCHATTERJEE24
 
Ad

More from Nikhil Pandit (9)

PPT
Simplifies and normal forms - Theory of Computation
Nikhil Pandit
 
PPT
Software Coding- Software Coding
Nikhil Pandit
 
PPT
Use case Diagram and Sequence Diagram
Nikhil Pandit
 
PPTX
The scope of contribution
Nikhil Pandit
 
PPTX
4 stroke diesel engine
Nikhil Pandit
 
PPT
CHAIN RULE AND IMPLICIT FUNCTION
Nikhil Pandit
 
PPTX
Register transfer and micro-operation
Nikhil Pandit
 
PPTX
Spyware and rootkit
Nikhil Pandit
 
PPTX
Inline Functions and Default arguments
Nikhil Pandit
 
Simplifies and normal forms - Theory of Computation
Nikhil Pandit
 
Software Coding- Software Coding
Nikhil Pandit
 
Use case Diagram and Sequence Diagram
Nikhil Pandit
 
The scope of contribution
Nikhil Pandit
 
4 stroke diesel engine
Nikhil Pandit
 
CHAIN RULE AND IMPLICIT FUNCTION
Nikhil Pandit
 
Register transfer and micro-operation
Nikhil Pandit
 
Spyware and rootkit
Nikhil Pandit
 
Inline Functions and Default arguments
Nikhil Pandit
 

Recently uploaded (20)

PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
GRADE-3-PPT-EVE-2025-ENG-Q1-LESSON-1.pptx
EveOdrapngimapNarido
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
GRADE-3-PPT-EVE-2025-ENG-Q1-LESSON-1.pptx
EveOdrapngimapNarido
 

Arrays Basics

  • 2. Definition :-Definition :- • Arrays are complex variables that can hold multiple values of the same data type. • Array is a fixed type sequenced collection of elements of the same data type. • It is simply a grouping of like-type data. • Some examples where a concept of arrays can be used :- 1) List of employees in an organization. 2) Exam scores of a class of students. 3) Table of daily rainfall data.
  • 3. Origin of the Arrays :-Origin of the Arrays :-
  • 4. What is the Need of anWhat is the Need of an Array ?Array ? • To store large number of variables of same type under a single variable. • Easy understanding of the program. • It provides a convenient structure for representing data. • We can use arrays to perform large amounts of data in smaller values of commands and yet we can have proper output.
  • 5. Types of Arrays :-Types of Arrays :- • There are basically three types of arrays used in a C programming language :- 1) One-dimensional 2) Two-dimensional 3) Multi-dimensional
  • 6. One-dimensional arrays :-One-dimensional arrays :- • The array which is used to represent and store data in a linear form is called as single or one dimensional array. • A structured collection of components all of the same type, that is given a single name. • Each component is accessed by an index that indicates the component’s position within the collection. • Array position is always started at 0 and goes up to one less then the size
  • 7. Concept :-Concept :- • Syntax :- <data_type> <array_name> [size]; • Total size (in bytes):- total size = length of array * size of data type • The Memory allocation of the one dimensional array can be understood from the figure.
  • 8. Declaration of One-Declaration of One- dimensional arrays :-dimensional arrays :- • Like any other variable, arrays must be declared before they are used so that the compiler can allocate space for them in memory. The general form of array declaration is :- type variable name[ size ]; • Here in above syntax , 1) The type specifies the type of element that will be contained in the array, such as int, float, or char. 2) The size indicates the maximum number of elements that can be stored in array. 3) The Variable name indicates the name you want to assign to the array.
  • 9. Example :-Example :- 1. float height [50]; In above example, it declares the height to be an array containing of 50 real elements. Any subjects from 0 to 49 are valid. 2. int group[10]; In above example, it declares the group as an array to contain a maximum of 10 integer constants.
  • 10. Initialization of One-dimensionalInitialization of One-dimensional Array :-Array :- • After the array is declared, its elements must be initialized. • Otherwise, they will contain junk values. • An array can be initialized at either of the following stages :- 1) At compile time 2) At run time
  • 11. Compile time initialization :-Compile time initialization :- • Whenever we declare an array, we can initialize array directly at compile time. • Initialization of an array is known as compiler time initialization if and only if we assign certain set of values to array element before executing program .i.e. at compilation time.
  • 12. Explanation :-Explanation :- • Compiler counts the number of elements written inside pair of brackets and determines the size of arrays. • After counting the number of elements inside the brackets, the size of an array is declared during complete execution. • This type of initialization is called as “Compile time initialization”.
  • 13. Example :-Example :- 1. float total [5] = {0.0,15.75,-10} Here in above example, we initialize the first three elements to 0.0, 15.75 and -10 and the remaining two values to zero. 2. char name [ ] = {‘j’, ‘o’, ‘h’, ‘n’, ‘o’} Here in above example, declares the name to be an array of five characters, initialized with a string john ending with the null character.
  • 14. Run time initialization :-Run time initialization :- • An array can be explicitly initialized at run time. • This approach is usually applied for initializing large arrays. • Compile-time initialization can only be done using constant expressions, but run-time initialization can be done using any expression at all.
  • 15. Example :-Example :- for (i=0; i<100, i=i+1) { if i<50 sum [i] = 0.0; else sum [i] = 1.0; } • Here, the first 50 elements of the array “sum” are initialized to zero while the remaining 50 elements are initialized to 1.0 at run time.
  • 16. Searching and Sorting :-Searching and Sorting :- • Searching and sorting are two most frequent operations performed on arrays. • Computer scientists have devised several data structures and searching and sorting techniques that facilitate rapid access to data stored in lists. • More information on these two concepts are provided further…..
  • 17. Searching :-Searching :- • Searching is a process of finding the location of the specified element in a list. • The specified element is often called the search key. • If the process of searching finds a match for the search key with a list element value, the search is said to be successful, Otherwise it is unsuccessful. • Types of searching : 1) sequential search 2) binary search
  • 18. Sorting :-Sorting :- • Sorting is a process of arranging elements in the list according to their values, in ascending or descending order. • A sorted list is called a ordered list. • Many sorting techniques are available, but the most commonly used are 3 techniques :- 1) bubble sort 2) selection sort 3) insertion sort
  • 19. Two-dimensional arrays :-Two-dimensional arrays :- • The array which is used to represent and store data in a tabular form is called as two dimensional array. • Such type of array specially used to represent data in a matrix form. • Examples: 1) Lab book of multiple readings over several days 2) Periodic table 3) Movie ratings by multiple reviewers. - Each row is a different reviewer - Each column is a different movie
  • 20. Concept :-Concept :- • Syntax :- <data-type> <array_nm> [row_subscript] [column_subscript] • Memory allocation of these type of arrays can be understood from the figure.
  • 21. Declaration of Two-DimensionalDeclaration of Two-Dimensional Arrays :-Arrays :- • Like any other variable, arrays must be declared before they are used so that the compiler can allocate space for them in memory. The general form of array declaration is type array_name [row_size] [column_size] • Here in above syntax , 1) The type specifies the type of element that will be contained in the array, such as int, float, or char. 2) The size indicates the maximum number of elements that can be stored columns and rows in array. 3) The Variable_name indicates the name you want to assign to the array.
  • 23. Initialization of Two-DimensionalInitialization of Two-Dimensional Arrays :-Arrays :- • Like one dimensional arrays, two-dimensional arrays can be initialized by following their declaration with a list of initial values enclosed in brackets. • Two-dimensional arrays may be initialized by specifying bracketed values for each row and column.
  • 25. Multi-Dimensional Arrays :-Multi-Dimensional Arrays :- • C allows arrays of three or more dimensions. • The exact limit is determined by the compiler. • The general syntax of a multi-dimensional array is given below :- type array_name [s1] [s2] [s3]…….[sn]; where ‘s’ is the size of the dimension • For example, int survey [3] [5] [12]; float table [5] [6] [7] [8];