如何将内存分配给c中的宏? [英] How memory is allocated to macros in c?

查看:90
本文介绍了如何将内存分配给c中的宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何将内存分配给C中的#define变量.

I would like to know how the memory is allocated to #define variables in C.

#define VAR1 10

我有2个问题...

  1. VAR1是什么类型?
  2. VAR1存储在哪个内存段中?

推荐答案

VAR1既没有类型,也没有任何运行时表示形式.它只能被预处理器识别.

VAR1 has neither a type nor any runtime representation. It's only recognized by the preprocessor.

所以答案是 Mu :您的问题无法回答,因为它基于错误的假设.

So the answer is Mu: your question cannot be answered because it is based on incorrect assumptions.

这篇关于如何将内存分配给c中的宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆