JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

Class 6

Hindi social science science maths English

Class 7

Hindi social science science maths English

Class 8

Hindi social science science maths English

Class 9

Hindi social science science Maths English

Class 10

Hindi Social science science Maths English

Class 11

Hindi sociology physics physical education maths english economics geography History

chemistry business studies biology accountancy political science

Class 12

Hindi physics physical education maths english economics

chemistry business studies biology accountancy Political science History sociology

Home science Geography

English medium Notes

Class 6

Hindi social science science maths English

Class 7

Hindi social science science maths English

Class 8

Hindi social science science maths English

Class 9

Hindi social science science Maths English

Class 10

Hindi Social science science Maths English

Class 11

Hindi physics physical education maths entrepreneurship english economics

chemistry business studies biology accountancy

Class 12

Hindi physics physical education maths entrepreneurship english economics

chemistry business studies biology accountancy

Categories: C Language in hindi

Array : One Dimension Array in hindi 1D arrey in c language 1D अर्रे इन हिंदी भाषा

1D अर्रे इन हिंदी भाषा Array : One Dimension Array in hindi 1D arrey in c language :-
C programme मे fundamental datatypes int,float,double और char होते है |ये datataype बहुत उपयोग होती है |लेकिन ये data types केवल एक ही value को store कर सकता है | इसलिए  ये in datatype की limitation होती है |
दो या दो से अधिक datatype को handle (Processing,Reading,Printing) करने के लिए एक powerful datatype की आवश्कता है |C language मे भी derived data type होता है |derived data type को तीन प्रकार होते है |
1.Derived Types :
ये C कंप्यूटर मे Pre define data type होते है |लेकिन ये dynamic होते है |इसमें एक ही variable मे दो से अधिक datas को handle करने की capablity होती है |इसे use करने से पहले केवल  initial करना होगा|इसमें array,pointer,function आते है |
2.Fundamental Types:
ये भी कंप्यूटर मे Pre define data type होते है लेकिन ये एक variable मे केवल एक data value को handle कर सकते है |इसमें int ,char,double,float आदि आते है |
3.User Define Types :
ये user define datatype होते है |इसमें structure,unions ओए enumeration आते है |इस article मे हम array का प्रकारों का अध्धयन करेगे |

Array:

परिभाषाः
अंगेजी मे : Array is fixed size collection of homogeneous(Same data types) datatypes.
हिंदी मे : Array समान datatypes को समूह होता है |

उदहारण के लिए :
किसी week के सात दिनों के Temperature का समूह|
Food  store मे किसी food item की Perday sale का समूह आदि |

Array तीन प्रकार की होती है :

One  Dimension Array :

One Dimension Array मे,किसी एक data variable मे data किसी एक subscript  मे store होता है |ये दो प्रकार की होती है |
1.Row : इसमें Array Values ,Row structure मे store होती है |सभी block का के fixed address होता  है |डायग्राम मे दिखया गया है :-

2. Coloum Wise : इसमें array values,coloum structure मे store होती है |सभी memory blocks का fixed address होता है :

Array का syntax है :-

Array datatype variable-name[size];

Array data type: ये बताता है की किस तरह का datas Array मे store होगा |
variable-name : ये array का नाम होता है जिसे data assigning ,data calling मे use किया जाता है |
size: ये declare करती है की कितने memory blocks या datas array मे store हो सकती है |

जिस तरह ,किसी data types को use करने से पहले declare करना पड़ता है ठीक उसी प्रकार से array को use करने से पहले declare करना पड़ता है |

Array initial:
Array को declare करने के बाद initial करना पड़ता है |जब तक array को intailize नहीं किया जाता है जब तक ये garbage value store सकता है |ये दो प्रकार से सकता है:-
1.Compile Time initial:
इस प्रकार मे ,जैसे fundamental data variable को initail करते है |वैसे इसे भी initial करते है |इसका syntax है |

Array datatype variable-name[size]=[data values];

इसका उदहारण है :-

int a[5]-==[2,5,8,7,9];

इस उदहारण मे a एक array है जिसका datatype integer और size 5 है जिसमे address ‘0’ पर 2,address’1′ पर 5,address’2’पर 8 ,address ‘3’ पर 7 और address ‘4’ पर 9 store होता है |

उदहारण 2:

float temperature [7]=[22.7,23.7,27.8,12.4,23.5,23.6,29.8];

इस उदहारण मे array का नाम temperature है जिसका datatype float है ये सात दिनों के temperature  को store करता है |

2.Run Time initial:

जब किसी array को run time मे initial किया जाता है tab इस प्रकार के RUN TIME initial कहते है |मुख्य किसी array के run time initial मे for loop का use किया जाता है |ये methodology बहुत बड़ी array को initial करने मे use होती है |

उदाहरणके लिए :

#include<stdio.h>
#include<conio.h>
void main ()
{
int a[10];
int i;
for(i=1;i<=20;i+2)
{
if(i==5)
{
a[i]=10;
printf(“%d\n”,a[i])
}
else
{
a[i]=i;
printf(“%d\n”,a[i])
}
}
इस उदहारण मे जब i की value 5 होगी तब array a की address 5 पर 10 assign होगा और i की बाकि value के लिए i की value assign होगी |

आउटपुट होगा :
1
3
10
7
9
11
13
15
17
19

उदहारण के लिए :
इस उदहारण मे , Average को calculate करने के लिए code है |

#include<conio.h>
#include<stdio.h>
void main ()
{
int a[5];
int sum;
float avg;
printf(“Enter your data\n”);
for(i=0;i<=5;i++)
{
scanf(“%d”,&a[i]);
}
for (i=0;i<=5;i++)
{
sum=sum+a[i];
}
avg=sum/5;
printf(“Average of five values=%1f”,avg);
getch();
}

इस उदाहरण मे ,data को read करने के लिए for loop को use किया गया है |जब i=0 होने पर,a[i]=a[0] पात्र यूजर द्वारा दिए गये data store होता है और i=1 होने पर ,a[i]=a[1] , इसेर द्वारा दिया गया दूसरा data store होता है |ये प्रोसेस होती रहगी जब त्याक i की value 5 नहीं हो जाती है |

आउटपुट होगा :
Enter your data
12 23 34 54 23
Average of five values=29.2

Sbistudy

Recent Posts

four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं

चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…

2 days ago

Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा

आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…

4 days ago

pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए

युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…

6 days ago

THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा

देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…

6 days ago

elastic collision of two particles in hindi definition formula दो कणों की अप्रत्यास्थ टक्कर क्या है

दो कणों की अप्रत्यास्थ टक्कर क्या है elastic collision of two particles in hindi definition…

6 days ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now