Saturday, July 18, 2020

Array in c programming language

Array in c programming language



What is array?
Array is linear collection of similar element.
And this is a group of similar element.
Example,
                  Int a[5]=1,2,3,4,5;
Array declaration and initilization.

If we ,
Int []; then this is error.
And if we ,
Int a[]=1,2,3,4;
Int [4]=1,2,3,4;

That'll this is write and then you can do this.

One dimensional array,

                                                   One dimensional array are used to store list of value same data type and  one dimensional array are used to store a row of value and one dimensional array is linear array.C Programming Initializing 1-D Array - c4learn.com

Example,
                Int a[60];
                Int a[5];
The above declaration of one dimensional array reserves 5 continuously memory of 2 bytes
C Arrays (With Examples)

2 D array (matrix),

Two Dimensional Array in C. The two-dimensional array can be defined as aarray of arrays. The 2-D array is organized as matrices which can be represented as the collection of rows and columns. However, 2-D arrays are created to implement a relational database lookalike data structure.


For example,
1. Write a program 2 D array from the user       of 3*5 then display the matrix.

Multidimensional Arrays in C++
# include<studio.h>
       Void main();
{
Int i,j;
Int a[3] [5];
printf("enter the element\n");
for(i=0; i<=2; i++)
{
for(j=0; j<=4; j++)
{
scanf("%d",&a[i][j];
}
}
printf ("elements are \n");
for (i=0; i<=2; I++)
{
for (j=0; j<=4; j++)
{
Printf ("%d/t",&a[i][j];
}
printf ("\n");
}
}


1.  What is the difference between one dimensional array and two dimensional array in c?


What is the difference between one dimensional array and two ...



what is ड्रोन तकनीक

ड्रोन तकनीक एक उन्नत तकनीक है जो आजकल बहुत ज्यादा चर्चा में है। ड्रोन एक ऐसी उपकरण होता है जो बिना किसी मानव संचार के उड़ सकता है। इसका उपयो...