Posts

Showing posts with the label Generic Pointer

Void Pointer वोइड पॉइंटर

A void pointer is a special type of pointer variable in C language. It is used when the programmer does not know or does not need to specify the data type of the variable whose memory address will be stored in the pointer. The void keyword is used to declare a void pointer in C language. सी लैंग्वेज में वोइड पॉइंटर एक विशेष प्रकार का पॉइंटर वेरिएबल होता है। इसका प्रयोग उस परिस्थिति में किया जाता है जब प्रोग्रामर को यह ज्ञात न हो या आवश्यकता न हो कि पॉइंटर में जिस वेरिएबल का एड्रेस स्टोर किया जाएगा, वह किस डाटा टाइप का है। सी लैंग्वेज में वोइड पॉइंटर डिक्लेयर करने के लिए void कीवर्ड का प्रयोग किया जाता है। Syntax: void *pointer_name; Example: void *p; In the above example, p is a void pointer variable which can store the memory address of a variable of any data type. उपरोक्त उदाहरण में p एक वोइड पॉइंटर वेरिएबल है जो किसी भी डाटा टाइप के वेरिएबल का मेमोरी एड्रेस स्टोर कर सकता है। C Program for Void Pointer #include <stdio.h> #include <conio.h> void main() { char a; ...