C中的特定变量命名关注点

问题描述 投票:0回答:1

我正在编写程序,只需要检查是否可以命名变量outputinput?例如:

int output
int input

或者这是其他名称的预先分配名称吗?我要为程序导入的模块是:

#include <pwd.h>
#include <fcntl.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <setjmp.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <readline/history.h>
#include <readline/readline.h>
c variables naming-conventions naming
1个回答
0
投票

如果变量和保留字之间存在冲突,则编译器将在编译时警告或错误通知您。因此,如果编译不产生错误,则您为变量分配的名称很好。

© www.soinside.com 2019 - 2024. All rights reserved.