Hi all... i need to print a value of pointer variable in 16x2 LCD... for Eg.
void main() { int *a = 20; int b; *a=&b; print_LCD(value of pointer variable a) }
here is a simple example where i have declared a pointer variable 'a' whoes value is 20. and then i stored the value of pointer variable at the address of variable b. but i need to print the value of pointer variable on LCD screen. how can i do this.... can anybody help me please....
A pointer is a variable that stores a memory address. So your variable "a" is "a pointer to int" so it stores the address of a memory cell capable of storing an integer.
And the indirection of the pointer allows you to access the memory at that address. So the indirection of "a" accesses an integer variable storage space.
sorry... but did not got your point....
Try with something simpler. Then, once you've mastered that, try something a little more complex. Maybe something like adding two numbers together.