Array and String with CPP

Array:-

An array in C or CPP is a collection memory locations and elements can be accessed randomly 
using an array location. They are used to store similar types of elements as in the data type
must be the same for all elements. The elements of the array are located side by side in Memory.
We can use  third parentheses[] for array size
একই ধরনে র ডেটা টাইপের গুচ্ছকে অ্যারে (Array) বলে ।


We have two types of arrays:
1)One Dimensional Array
2)Multi Dimensional Array

Simple Example:-




                                                                           

String:-

We can Simply said String is Cha. a word, a sentence a paragraph everything is string
for example:-"Hello World", "Welcome to MEZBAH Tech Dairy"

Now we can declare and print write simple program


Explain:- Avobe This example we can print the string in Hello, we declare an array of size 50 char,

but our string Only 5 char.  So we don't need to declare such a large array. 

Here good to said when are declare string and after finished all char we have default null char'\0'

You can see bellow this example





#Thanks for reading#


Comments

Popular posts from this blog