c_cpp 递升运算子及结构指标运算子

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 递升运算子及结构指标运算子相关的知识,希望对你有一定的参考价值。

#include <stdio.h>
#include <stdlib.h>

typedef struct {
        int i;
} student;

int main()
{
        student *s = malloc(sizeof(student));
        s->i = 0;
        printf("%d\n", s->i);   /* 0 */
        printf("%d\n", s->i++); /* 0 */
        printf("%d\n", ++s->i); /* 2 */
        return 0;
}

以上是关于c_cpp 递升运算子及结构指标运算子的主要内容,如果未能解决你的问题,请参考以下文章

如何在实际场景中使用异常检测?阿里云Prometheus智能检测算子来了

JAVA int类型转short类型

halcon算子翻译——rectangle1_domain

数据类型的转换

语法》第九章 数据类型转换

如何在实际场景中使用异常检测?阿里云Prometheus智能检测算子来了