हिंदी माध्यम नोट्स
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
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
Pointer In Structure (Data Type) in hindi in c language पॉइंटर को स्ट्रक्चर के रूप में कैसे काम में लेते है
contain करते है उसी प्रकार structure data type मे भी array ऑफ़ structure के
first variable के address को contain करता है |
int house ;
और city जो की अलग अलग data type के है को contain करता है |
होती है |
होता है |
value store होगी |
add data type store कर सकता है |इस array को handle करने के लिए pointer ‘a’ को
use किया जाता है |
address store होता है |जब a++;
address मे increment हो जायेगा |और pointer ‘a’ मे array element a[1] का address
store हो जायेगा |
operator कहते है |
सेलेक्ट होगा |
1,a[0] का memeber city सेलेक्ट होगा |
इस उदहारण मे ,दो
record सेव होगे इसलिय इसमें structure data type ‘book’ के दो variable का array
को use करता है |जैसे
record 2 मे data read होगा |
kalam Price:230
Bhagat Price:250
Sorting Program
जब किसी array के element को sort किया जाता है तब उस प्रोग्रम को pointer से easily handle हो सकता है |
source code
#include<conio.h>
#include<stdio.h>
void sort(int ,int *);’
void main()
{
int i;
int size=8;
int d[8]={12,56,23,45,76,65,96,32};
sort (size,a);
printf(“Sorted Array “);
for(i=0;i<8;i++)
{
printf(“%d”,d[i]);
}
getch();
}
void sort (int n,int *a)
{
int e,f,t;
for(e=1;e<=n-1;e++)
{
for(f=1;f<n-1;f+
{
if(*(a+f-1)>=*(a+f))
{
t=*(a+f-1);
*(a+f-1)=*(a+f);
*(a+f)=t;
}
}
इस प्रोग्रम मे array को function argument मे pass करते है |और pointer variable ‘a’ मे receive कर देते है |comparison और swapping प्रोसेस मे pointer variable की value को use किया है जो की array element के address है |
आउटपुट होगा :
Sorted Array
96 76 65 56 45 32 23 12
Recent Posts
नियत वेग से गतिशील बिन्दुवत आवेश का विद्युत क्षेत्र ELECTRIC FIELD OF A POINT CHARGE MOVING WITH CONSTANT VELOCITY in hindi
ELECTRIC FIELD OF A POINT CHARGE MOVING WITH CONSTANT VELOCITY in hindi नियत वेग से…
four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं
चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…
Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा
आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…
pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए
युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…
THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा
देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…
elastic collision of two particles in hindi definition formula दो कणों की अप्रत्यास्थ टक्कर क्या है
दो कणों की अप्रत्यास्थ टक्कर क्या है elastic collision of two particles in hindi definition…