इस विषय में हम Pointer के बारे में discuss करने वाले हैं। वे क्या होते हैं। हम इसे कैसे use कर सकते हैं और programming में common mistakes जिसे हम generally face करते हैं।
आप C में variable के बारे में जानते ही होंगे, C में बहुत प्रकार variables होती है। Pointer भी एक तरह की variable ही होती है। Pointer C की काफी सारे विशेषताओं में से एक है।
pointer नाम से स्पष्ठ है, की ये किसी को point करने का काम करती है। C language में भी pointer का kuchh ऐसा ही काम है।
Pointer एक ऐसा Variable होता है, जो किसी दूसरे variable के memory me store होने की address या location को store करती है न की उस variable के मान या value को।
Example
आप C में variable के बारे में जानते ही होंगे, C में बहुत प्रकार variables होती है। Pointer भी एक तरह की variable ही होती है। Pointer C की काफी सारे विशेषताओं में से एक है।
pointer नाम से स्पष्ठ है, की ये किसी को point करने का काम करती है। C language में भी pointer का kuchh ऐसा ही काम है।
Pointer एक ऐसा Variable होता है, जो किसी दूसरे variable के memory me store होने की address या location को store करती है न की उस variable के मान या value को।
Example
/* Example to demonstrate use of reference operator in C programming. */
#include <stdio.h>
int main()
{
int var = 5;
printf("Value: %d\n", var);
printf("Address: %u", &var); //Notice, the ampersand(&) before var.
return 0;
}
OutputValue: 5 Address: 2686778
Nice blog
ReplyDelete