pointer in data structure in hindi, pointer in hindi,
- Pointer in data structure in hindi,
- Pointer Details in hindi,
- Program,
- Pointer,
- Output,
- Program,
- Pointer to Pointer in hindi,
- Pointer to Pointer in hindi,
- Program,
- Pointer Details in hindi,
Contents
show
Pointer in data structure in hindi
Computer memory में कहीं भी stored value के पते को इंगित करने के लिए pointer का उपयोग किया जाता है। दोहराए जाने वाली प्रक्रियाओं के लिए pointer प्रदर्शन में सुधार करता है
जैसे:
- Traversing String
- Lookup Tables
- Control Tables
- Tree Structures
Pointer Details in Hindi
- Pointer arithmetic: चार arithmetic operator हैं जिनका उपयोग pointers में किया जा सकता है: ++, -, +, – –
- Array of pointers: आप कई pointers को रखने के लिए arrays को परिभाषित कर सकते हैं।
- Pointer to pointer: C आपको pointer पर pointer लगाने की सुविधा देता है।
- Passing pointers to functions in C: किसी argument को reference या address से पास करना passed argument को called function के द्वारा calling function में परिवर्तित करने में सक्षम बनाता है।
- Return pointer from function in C: C function को local variable, static variable के साथ-साथ dynamically आवंटित मेमोरी को भी pointer return करने की अनुमति देता है।
Program
- #include <stdio.h>
- int main( )
- {
- int a = 5;
- int *b;
- b = &a;
- printf (“value of a = %d\n”, a);
- printf (“value of a = %d\n”, *(&a));
- printf (“value of a = %d\n”, *b);
- printf (“address of a = %u\n”, &a);
- printf (“address of a = %d\n”, b);
- printf (“address of b = %u\n”, &b);
- printf (“value of b = address of a = %u”, b);
- return 0;
- }
Output
- value of a = 5
- value of a = 5
- address of a = 3010494292
- address of a = –1284473004
- address of b = 3010494296
- value of b = address of a = 3010494292
Program
Pointer to Pointer in Hindi
- #include <stdio.h>
- int main( )
- {
- int a = 5;
- int *b;
- int **c;
- b = &a;
- c = &b;
- printf (“value of a = %d\n”, a);
- printf (“value of a = %d\n”, *(&a));
- printf (“value of a = %d\n”, *b);
- printf (“value of a = %d\n”, **c);
- printf (“value of b = address of a = %u\n”, b);
- printf (“value of c = address of b = %u\n”, c);
- printf (“address of a = %u\n”, &a);
- printf (“address of a = %u\n”, b);
- printf (“address of a = %u\n”, *c);
- printf (“address of b = %u\n”, &b);
- printf (“address of b = %u\n”, c);
- printf (“address of c = %u\n”, &c);
- return 0;
- }
Pointer to Pointer
- value of a = 5
- value of a = 5
- value of a = 5
- value of a = 5
- value of b = address of a = 2831685116
- value of c = address of b = 2831685120
- address of a = 2831685116
- address of a = 2831685116
- address of a = 2831685116
- address of b = 2831685120
- address of b = 2831685120
- address of c = 2831685128