"C" pointer variable

Source: Internet
Author: User

I found that many of my age-old people are already specialized in a particular profession, and I am still lounging about the silt ...

In fact, my dream is a writer ... There are always some dilemmas in life, face these if I have enough money, it is not difficult dilemma, mouth ding Yi ...

Address memory characters & can only be applied to objects in memory, both variables and array elements, which cannot act on expressions, constants, or variables of type register.

Why can't it be used for constants ... Register I also understand that, because it is put in the register, but the constant is a bit of a confused.

So I took out the codeblocks test and found that it was a variable that had been replaced before it was compiled. Define,enum two kinds of.

1#include <stdio.h>2#include <stdlib.h>3 #defineFairs 444 intMain ()5 {6 7         enum{ELISE = the};8 9         Const inti =8;Tenprintf"%p\n%d\n", &i,i);//const type constant, just a variable with a value that remains constant, so there is still an address that can be addressed Oneprintf"%d \ n", ELISE);//cannot address the constants of an enum Aprintf"%d \ n", fairs);//cannot address a constant of define -     return 0;//all constants cannot be planted because they are not maneuverable -}

Also, a variable that doesn't want to be a pointer is not a good variable because the pointer has an object ...

A unary operator that does not want to be a * is not a good operator because only * accesses an object

In addition, both the garlic guest and the CPL talked about the pointer as a function parameter

"C" pointer variable

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.