Arrays in C programming language part 1 | Malayalam C programming Language

preview_player
Показать описание
#sjtutorialslive #CalicutUniversity #UniversityOfCalicut #cprogramminglanguagemalayalam #Cprogrammingclassesforbeginnersmalayalam #Cpgm #cprogramminginMalayalam #MalayalamprogramminginC #MostBasicCProgrammingConceptsYouShouldKnow #CProgrammingClassesforbeginnersinMalayalam #മലയാളംകമ്പ്യൂട്ടർസയൻസ്സിപ്രോഗ്രാമിങ് #CprogrammingtutorialinMalayalam #ComputerSciencecprogrammingmalayalam #ComputerScienceclassesinMalayalamforStudents #Cprogramminglanguagemalayalam #cpgmlanguage

This is a course For C programming beginners. This course is conducted by Sajeer EK . in this course the students will Practical and theoretical concepts of C Programming throughout the lectures .The course will Help University students for the C workshops and gives an insight on C programming Theories.Through this course students can learn at their own pace. Along with Calicut University students this course will help students who want to learn programming with C and also those who step into the world of computers.

An array is defined as the collection of similar type of data items stored at contiguous memory locations. Arrays are the derived data type in C programming language which can store the primitive type of data such as int, char, double, float, etc. It also has the capability to store the collection of derived data types, such as pointers, structure, etc. The array is the simplest data structure where each data element can be randomly accessed by using its index number.

C array is beneficial if you have to store similar elements. For example, if we want to store the marks of a student in 6 subjects, then we don't need to define different variables for the marks in the different subject. Instead of that, we can define an array which can store the marks in each subject at the contiguous memory locations.

Properties of Array
The array contains the following properties.

Each element of an array is of same data type and carries the same size, i.e., int = 4 bytes.
Elements of the array are stored at contiguous memory locations where the first element is stored at the smallest memory location.
Elements of the array can be randomly accessed since we can calculate the address of each element of the array with the given base address and the size of the data element.
Advantage of C Array
1) Code Optimisation: Less code to the access the data.

2) Ease of traversing: By using the for loop, we can retrieve the elements of an array easily.

3) Ease of sorting: To sort the elements of the array, we need a few lines of code only.

4) Random Access: We can access any element randomly using the array.

Disadvantage of C Array
1) Fixed Size: Whatever size, we define at the time of declaration of the array, we can't exceed the limit. So, it doesn't grow the size dynamically like Linked List which we will learn later.
Declaration of C Array
We can declare an array in the c language in the following way.

data_type array_name[array_size];
Now, let us see the example to declare the array.

int marks[5];
Here, int is the data_type, marks are the array_name, and 5 is the array_size.

Initialisation of C Array
The simplest way to initialize an array is by using the index of each element. We can initialize each element of the array by using the index. Consider the following example.

marks[0]=80;//initialization of array
marks[1]=60;
marks[2]=70;
marks[3]=85;
marks[4]=75;
#include stdio.h
int main(){
int i=0;
int marks[5];//declaration of array
marks[0]=80;//initialization of array
marks[1]=60;
marks[2]=70;
marks[3]=85;
marks[4]=75;
//traversal of array
for(i=0;i 5;i++){
printf("%d \n",marks[i]);
}//end of for loop
return 0;
}
note: less than and grater than not represent here
#sjtutorialslive

😍😍😍😍😍 Please Like | Share | Subscribe 😍😍😍😍😍

©NOTE : All Content used is copyright to Walk With SJ Tutorials . Use or commercial Display or Editing of the content without Proper Authorization is not Allowed ✔

©NOTE : Some Images , Musics , Videos , Graphics , text are shown​ in this video May be Copyrighted to respected owners , not mine ✔

DISCLAIMER: This Channel DOES NOT Promote or encourage Any illegal activities , all contents provided by This Channel is meant for EDUCATIONAL PURPOSE only ✔

#sjtutorialslive
Рекомендации по теме
Комментарии
Автор

PART 2 ARRAY KANNUNILALLO ORU PLAY LIST UNDAKUMBO KANDUPIDIKAN EASY AAN

madhukorangodu
welcome to shbcf.ru