In: Computer Science
Lets Assume We have Course Names as Maths , English Algorithm , Data Structures , COA
An array is a collection of items stored in contiguous memory location . All the items are of same data type such as integers or strings
we have Names of Course so Data Type used Will be Strings
Declare a array
String arr[10];
This statement means that arr is a array that contain 10 elements of String Data Type
To Declare and Initialize a Array we do
String Course_Names [] ={ "Maths" , "English" "Algorithm" , "Data Structures ", "COA" };
In this we don't need to specify the Size we can simply Write the items in Curly Braces separated by commas to initialize the array .
This how you can declare and initialize a Array containing Course Names .
Note :--> Syntax may differ according to the programming language you are using . As you not mentioned any so I have Used Mostly used i.e. C++ . If u need in any other language just ask in comments
If u like the answer then Upvote it and have any doubt comment it