代码拉取完成,页面将自动刷新
#include <stdio.h>
#include <wuqi/ByteUtils.h>
#include <unistd.h>
#include "learnString/include/LearnString.h"
#include "learnString/include/LearnFileManager.h"
typedef int *INT;
#define tokenpaster(n) printf ("token" #n " = %d", token##n)
#define MAX(x, y) ((x) > (y) ? (x) : (y))
int main(int argc, char *argv[]) {
printf("argc is %d \n ", argc);
for (int i = 0; i < argc; ++i) {
printf("argv[%d] is %s \n ", i, argv[i]);
}
unsigned char ss = '2';
unsigned char arrayUnsignedChars[100];
memset(arrayUnsignedChars, 0, sizeof(unsigned char) * 100);
strcpy(arrayUnsignedChars, "hello");
char arrayChars[100];
memset(arrayChars, 0, sizeof(char) * 100);
strcpy(arrayChars, "hello");
printf("arrayChars %s \n", arrayChars);
printf("arrayUnsignedChars %s \n", arrayUnsignedChars);
int aaa = 101;
INT sss = &aaa;
printf("sss %d \n", *sss);
int *p = malloc(100);
printf("address %p\n", p);
free(p);
printf("File :%s\n", __FILE__);
printf("Date :%s\n", __DATE__);
printf("Time :%s\n", __TIME__);
printf("Line :%d\n", __LINE__);
printf("ANSI :%d\n", __STDC__);
//标记粘贴运算符(##)
//宏定义内的标记粘贴运算符(##)会合并两个参数。它允许在宏定义中两个独立的标记被合并为一个标记
int token34 = 40;
tokenpaster(34);
printf("Max between 20 and 10 is %d\n", MAX(10, 20));
if (access("/Users/zkingcobra/Projects/CLionProjects/LearnC", F_OK) == 0) {
printf("目录存在\n");
}
if (access("/Users/zkingcobra/Projects/CLionProjects/LearnC", R_OK) == 0) {
printf("目录有可读权限\n");
}
if (access("/Users/zkingcobra/Projects/CLionProjects/LearnC", W_OK) == 0) {
printf("目录有可写权限\n");
}
if (access("/Users/zkingcobra/Projects/CLionProjects/LearnC", X_OK) == 0) {
printf("目录有执行权限\n");
}
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。