top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the difference between Pointer static and static pointer?

+4 votes
159 views
What is the difference between Pointer static and static pointer?
posted Nov 18, 2013 by Giri Prasad

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

If I understood your question correctly, you want to ask what is the difference between a pointer pointing to a static variable and a static pointer.

See the following two declaration

static int * p;
and
static int abc
int  * p=abc;

First one is the static pointer which has the file/function scope. Where as second case is a pointer which is pointing to the static variable abc (again abc has a file/function scope). Pointer significance is only with the scope of abc however same pointer can be used to point to some other variable.

answer Nov 18, 2013 by Salil Agrawal
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...