Assign Address to Pointer Variable in C

No comments


Assign Address to Pointer Variable :-

When we declare a pointer variable it contains garbage value, i.e. it may be pointing anywhere in the memory. So we should always assign an address before using it in the program.

Example :-

int  * iptr,age=30;
float * fptr=1500.50;
iptr= &age;
fptr = *sal;

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀