click below
click below
Normal Size Small Size show me how
pointers
introduction to pointers
Question | Answer |
---|---|
what is pointer? | pointer is variable which holds address of another variable |
write syntax for declaration of pointer | datatype *pointer_name |
write syntax for initialization pointer | pointer_name=&variable |
declaration of pointer variable: | int *p |
initialization of pointer | p=&a |
advantage of pointer | Dynamic allocation of memory |
accessing of pointer | *pointer_name |