The difference is: 1. *p represents the content stored in the memory address pointed by this pointer, p represents the name of a pointer variable; 2. *p is generally a variable or constant that is consistent with the pointer type, p The output is a hexadecimal number; 3. *p tells the program to retrieve data from that address, and p stores the address.
The operating environment of this tutorial: Windows 7 system, C 17 version, Dell G3 computer.
In C language, *p and p are commonly used in pointers to represent a pointer variable. The difference between *p and p is:
1. The meanings are different
* p represents the content stored in the memory address pointed to by this pointer.
p represents the name of a pointer variable, which refers to the memory address pointed to by the pointer variable.
2. The output format is different
*p is generally a variable or constant that is consistent with the pointer type.
p outputs a hexadecimal number and outputs the address of a pointer.
3. Different functions
*p Let the program go to that address to retrieve the data.
p stores the address.
Examples:
1,
int a[5]={1,2,3,4,5}; int *p=a;//这是在定义指针变量p的同时就直接给它初始化,即把数组a的首地址赋给它。
2,
int a[5]={1,2,3,4,5}; int *p;//声明指针变量p p = a;
Extended information
(*p) operation is an operation that returns the value of p as the value of the address space. (&p) is an operation that returns the address opened when p was declared. You can use assignment statements to assign values to memory addresses.
Example:
int *p; p=2003H; *p=3000H
Result:
**p=*(*(p))=*(*(2003H))=*(3000H)=3000H。 &&p=&(&(p))=&(3001H),此时出错了,3001H 是个常数无法存放地址。 *&p=*(&(p))=*(3001H)=2003H,也就是*&p=p。
Recommended tutorial: "C#"
The above is the detailed content of What is the difference between *p+1 and *(p+1). For more information, please follow other related articles on the PHP Chinese website!

The domestic AI dark horse DeepSeek has risen strongly, shocking the global AI industry! This Chinese artificial intelligence company, which has only been established for a year and a half, has won wide praise from global users for its free and open source mockups, DeepSeek-V3 and DeepSeek-R1. DeepSeek-R1 is now fully launched, with performance comparable to the official version of OpenAIo1! You can experience its powerful functions on the web page, APP and API interface. Download method: Supports iOS and Android systems, users can download it through the app store; the web version has also been officially opened! DeepSeek web version official entrance: ht

At the beginning of 2025, domestic AI "deepseek" made a stunning debut! This free and open source AI model has a performance comparable to the official version of OpenAI's o1, and has been fully launched on the web side, APP and API, supporting multi-terminal use of iOS, Android and web versions. In-depth search of deepseek official website and usage guide: official website address: https://www.deepseek.com/Using steps for web version: Click the link above to enter deepseek official website. Click the "Start Conversation" button on the homepage. For the first use, you need to log in with your mobile phone verification code. After logging in, you can enter the dialogue interface. deepseek is powerful, can write code, read file, and create code

DeepSeek: How to deal with the popular AI that is congested with servers? As a hot AI in 2025, DeepSeek is free and open source and has a performance comparable to the official version of OpenAIo1, which shows its popularity. However, high concurrency also brings the problem of server busyness. This article will analyze the reasons and provide coping strategies. DeepSeek web version entrance: https://www.deepseek.com/DeepSeek server busy reason: High concurrent access: DeepSeek's free and powerful features attract a large number of users to use at the same time, resulting in excessive server load. Cyber Attack: It is reported that DeepSeek has an impact on the US financial industry.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
