Right Click to Search

Sunday, January 10, 2025

Pointer to Constant Objects


Pointer to Constant Objects :
  • Pointer to a Constant Object is called as 'Pointer to Constant Object'
 Syntax :
const  data-type  *pointer_name ;

 Example :
int n = 30 ;
const int ptr;
ptr = &n;

What does it means ?
" Pointer to Such Object cannot be changed "
Illegal Use !!!!
*ptr = 20 ; 

Note : 
ptr++ is valid in this Case !!!

Pointer Home

Bookmark & Share

Tags / Keywords : |

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates