Hi Buddies
Can u please help me in understanding these codes and their differences.
Code 1
void main()
{
int *p=NULL;
scanf("%d",&p);
printf("\np value: %d",p);
}
Code 2
void main()
{
int *p=NULL;
scanf("%d",p);
printf("\np value: %d",*p);
}
What will be the result of these code and their differences in storage?
Thanks and Regards
Shyam
Can u please help me in understanding these codes and their differences.
Code 1
void main()
{
int *p=NULL;
scanf("%d",&p);
printf("\np value: %d",p);
}
Code 2
void main()
{
int *p=NULL;
scanf("%d",p);
printf("\np value: %d",*p);
}
What will be the result of these code and their differences in storage?
Thanks and Regards
Shyam
Comment