C programming (Array) computer project Class 10

Array is a collection of  homogenous Data stored under unique name  . The value in an array  is called as element of an array

This element are accessed by a number called as subscript or index number
Array may be any variable type. it is also called as subscripted variable .

Types of an array

There are basically two type of an array:

1.one single dimensional array

2. Two dimensional array

Single dimensional array


The array which is used to represent and store data in a linear form is called as single dimensional array

Syntax:

<data-type> <array-name>[size];

Example

int a [3]

char ch [20] = “introduction”;

float tax[3]={5270.43,78.54,3720};

The total size of array variable occupied in the memory is

Total size=length of array *size of data type

In above example a is an array of type integer which has storage size of 3 element so the total size below is 3*2 =6 byte.

Memory Allocation

Program:

/*Program to demonstrate one dimensional array*/

Features

array size should be positive number only

String array always terminate with null character
Element are counted from 0 to n – 1
Useful for multiple reading of element


Disadvantage:


There is no easy method to initiate large number of array element
It is difficult to insulize selected element

Two –Dimensional Array

Syntax:

<data_type><array_name>[row_subscript][column_subscript];

Example:

In above example is an area of type integer which have a storage size 3*3 matrix.

Memory Allocation :

Program :

Limitation of two-dimensional array :

(a) we cannot delete any element from an array.

(b) if we do not know that how many elements have to be stored in a memory in advance, then there will be memory wastage at large array size is specified.

Conclusion :

This project give the knowledge about array and types of used in C-language.

VIVA-VOCE QUESTIONS

Ques.1 What is an array?

Ans. An are is a collection of variables, which are all the same type.

Ques.2 From which element binary search starts searching in an array?

Ans. Middle element.

Ques.3 What is sorting?

Ans. Arranging the data in some order is known as sorting.

Ques.4 What is the number (index) of first element in array?

Ans. 0 (Zero).

Also Read

Class 10th Computer Science Project Work

Class 10th Computer Science ka Project Work in Hindi

Class 10th Computer Science Project Work-3

Class 10th Computer Science Project – 2

More than 400 attended Vivekananda Kendra’s Young India know Thyself orientation

विवेकानंद केंद्र के Young India Know Thyself ओरिएंटेशन में 400 से अधिक युवाओं ने भाग लिया The sixth season of Young India Know Thyself: A...

विवेकानंद केंद्र दिल्ली शाखा ने मनाया “साधना दिवस” Vivekananda Kendra Delhi Branch Celebrated “Sadha Diwas”

विवेकानंद केंद्र, कन्याकुमारी की दिल्ली शाखा ने पिछले रविवार को माननीय एकनाथ जी रानडे की जयंती को "साधना दिवस" के रूप में मनाया। श्री...
Bindesh Yadavhttps://untoldtruth.in
I'm Bindesh Yadav A Advance information security expert, Android Application and Web Developer, Developed many Website And Android app for organization, schools, industries, Commercial purpose etc. Pursuing MCA degree from Indira Gandhi National Open University (IGNOU) and also take degree of B.Sc(hons.) in Computer Science from University of Delhi "Stop worrying what you have been Loss,Start Focusing What You have been Gained"

कोई जवाब दें

कृपया अपनी टिप्पणी दर्ज करें!
कृपया अपना नाम यहाँ दर्ज करें

BEST DEALS

Most Popular