Connecting Tech Pros Worldwide Forums | Help | Site Map

What is an unqualified pointer in C?

Newbie
 
Join Date: Jul 2007
Posts: 6
#1: Aug 8 '07
What are unqualified pointers ?

zodilla58's Avatar
Expert
 
Join Date: Dec 2006
Posts: 783
#2: Aug 8 '07

re: What is an unqualified pointer in C?


Quote:

Originally Posted by suresh gani

What are unqualified pointers ?

Hi,

This I have read from some website:

X int * Y p ;
means that the pointer p is stored in the Y memory. This pointer points to integer data that is located in the X memory. If no memory qualifiers are used, the data is stored into unqualified memory.

For proper integration with the C language, a memory structure is specified, where the unqualified memory encompasses all other memories. All unqualified pointers are pointers into this unqualified memory.

Regards
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#3: Aug 8 '07

re: What is an unqualified pointer in C?


Quote:

Originally Posted by zodilla58

Hi,

This I have read from some website:

X int * Y p ;
means that the pointer p is stored in the Y memory. This pointer points to integer data that is located in the X memory. If no memory qualifiers are used, the data is stored into unqualified memory.

For proper integration with the C language, a memory structure is specified, where the unqualified memory encompasses all other memories. All unqualified pointers are pointers into this unqualified memory.

Regards

Huh? As far as I know qualified types are types with 'volatile' or 'const' added to
the type:

Expand|Select|Wrap|Line Numbers
  1. volatile int x; // qualified
  2. volatile int* px; // qualified
  3. int y; // unqualified
  4. int *py; // unqualified
  5. // etc.
  6.  
kind regards,

Jos
zodilla58's Avatar
Expert
 
Join Date: Dec 2006
Posts: 783
#4: Aug 8 '07

re: What is an unqualified pointer in C?


Quote:

Originally Posted by JosAH

Huh? As far as I know qualified types are types with 'volatile' or 'const' added to
the type:

Expand|Select|Wrap|Line Numbers
  1. volatile int x; // qualified
  2. volatile int* px; // qualified
  3. int y; // unqualified
  4. int *py; // unqualified
  5. // etc.
  6.  
kind regards,

Jos

Even I didn't know. Just a new question and I search the web and found this.

Thanks for clear explanation :)
sicarie's Avatar
Moderator
 
Join Date: Nov 2006
Location: USA
Posts: 3,929
#5: Aug 8 '07

re: What is an unqualified pointer in C?


Quote:

Originally Posted by suresh gani

What are unqualified pointers ?

Suresh Gani-

Please read this thoroughly before posting - we try to keep the site neat by using descriptive titles, etc... and appreciate your help!
Reply