C语音mklink命令语法不正确确

C语言 以下叙述中错误的是?_百度知道
C语言 以下叙述中错误的是?
A)一个变量的作用域的开始位置完全取决于变量定义语句的位置
B)全局变量可以在函数以外的任何部位进行定义
C)局部变量的“生存期”只限于本次函数调用,因此不可能将局部变量的运算结果保存至下一次调用
D)一个变量说明为static存储类是为了限制其他编译单...
我有更好的答案
这种题目太不严谨了要说错的acd都错a 作用域开始位置取决于声明的位置c static局部变量可以保存至下一次调用d 只有全局的static变量才是这个作用,局部的如c 答案估计是d
”作用域开始位置取决于声明的位置 “ ” 取决于变量定义语句的位置“。。。有什么区别啊??
声明是告诉编译器有这么个玩意儿,与定义的区别是前者不分配内存,后者分配内存。比如&void&foo(void){&&&&g++;}int&g;这种情况下编译报错,但如果在foo函数前面加上则可以编译通过所以g的作用域是从声明开始的而不是定义
采纳率:51%
来自团队:
D错了,静态变量不是为了限制其他编译单位的引用,静态局部变量在函数内定义,但不像自动变量那样,当调用时就存在,退出函数时就消失。静态局部变量始终存在着,也就是说它的生存期为整个源程序。(2)静态局部变量的生存期虽然为整个源程序,但是其作用域仍与自动变量相同,即只能在定义该变量的函数内使用该变量。退出该函数后, 尽管该变量还继续存在,但不能使用它。(3)允许对构造类静态局部量赋初值。若未赋以初值,则由系统自动赋值。数值型变量自动赋初值0,字符型变量赋空字符。
C)变量如果说明了static呢??
声明了static,就具有静态变量的属性了,根据我写的3条规定来理解
选D,因为如果全局变量声明为static是为了限制其他编译单位的引用,但局部变量声明为static是为了将其值保存至下一次调用
C中,假如有个局部变量a=0,a++后变成1.。“不可能将局部变量的运算结果保存至下一次调用”
它说的不能保存的运算结果是0还是1?
一、C语言中Expression syntax in function main 的意思是在主函数当中表达式语法错误。二、下面为C语言的错误大全及中文解释:1: Ambiguous operators need parentheses — 不明确的运算需要用括号括起2: Ambiguous symbol xxx — 不明确的符号3: Argument list syntax error — 参数表语法错误4: Array bounds missing — 丢失数组界限符5: Array size toolarge — 数组尺寸太大6: Bad character in paramenters — 参数中有不适当的字符7: Bad file name format in include directive — 包含命令中文件名格式不正确8: Bad ifdef directive synatax — 编译预处理ifdef有语法错9: Bad undef directive syntax — 编译预处理undef有语法错10: Bit field too large — 位字段太长11: Call of non-function — 调用未定义的函数12: Call to function with no prototype — 调用函数时没有函数的说明13: Cannot modify a const object — 不允许修改常量对象14: Case outside of switch — 漏掉了case 语句15: Case syntax error — Case 语法错误16: Code has no effect — 代码不可能执行到17: Compound statement missing{ — 分程序漏掉&{&18: Conflicting type modifiers — 不明确的类型说明符19: Constant expression required — 要求常量表达式20: Constant out of range in comparison — 在比较中常量超出范围21: Conversion may lose significant digits — 转换时会丢失意义的数字22: Conversion of near pointer not allowed — 不允许转换近指针23: Could not find file xxx — 找不到XXX文件24: D — 说明缺少&;&25: Declaration syntax error — 说明中出现语法错误26: Default outside of switch — Default 出现在switch语句之外27: Define directive needs an identifier — 定义编译预处理需要标识符28: Division by zero — 用零作除数29: Do statement must have while — Do-while语句中缺少while部分30: Enum syntax error — 枚举类型语法错误31: Enumeration constant syntax error — 枚举常数语法错误32: Error directive :xxx — 错误的编译预处理命令33: Error writing output file — 写输出文件错误34: Expression syntax error — 表达式语法错误35: Extra parameter in call — 调用时出现多余错误36: File name too long — 文件名太长37: Function call missing ) — 函数调用缺少右括号38: Fuction definition out of place — 函数定义位置错误39: Fuction should return a value — 函数必需返回一个值40: Goto statement missing label — Goto语句没有标号41: Hexadecimal or octal constant too large — 16进制或8进制常数太大42: Illegal character x — 非法字符x43: Illegal initialization — 非法的初始化44: Illegal octal digit — 非法的8进制数字 A45: Illegal pointer subtraction — 非法的指针相减46: Illegal structure operation — 非法的结构体操作47: Illegal use of floating point — 非法的浮点运算48: Illegal use of pointer — 指针使用非法49: Improper use of a typedefsymbol — 类型定义符号使用不恰当50: In-line assembly not allowed — 不允许使用行间汇编51: Incompatible storage class — 存储类别不相容52: Incompatible type conversion — 不相容的类型转换53: Incorrect number format — 错误的数据格式54: Incorrect use of default — Default使用不当55: Invalid indirection — 无效的间接运算56: Invalid pointer addition — 指针相加无效57: Irreducible expression tree — 无法执行的表达式运算58: Lvalue required — 需要逻辑值0或非0值59: Macro argument syntax error — 宏参数语法错误60: Macro expansion too long — 宏的扩展以后太长61: Mismatched number of parameters in definition — 定义中参数个数不匹配62: Misplaced break — 此处不应出现break语句63: Misplaced continue — 此处不应出现continue语句64: Misplaced decimal point — 此处不应出现小数点65: Misplaced elif directive — 不应编译预处理elif66: Misplaced else — 此处不应出现else67: Misplaced else directive — 此处不应出现编译预处理else68: Misplaced endif directive — 此处不应出现编译预处理endif69: Must be addressable — 必须是可以编址的70: Must take address of memory location — 必须存储定位的地址71: No declaration for function xxx — 没有函数xxx的说明72: No stack — 缺少堆栈73: No type information — 没有类型信息74: Non-portable pointer assignment — 不可移动的指针(地址常数)赋值75: Non-portable pointer comparison — 不可移动的指针(地址常数)比较76: Non-portable pointer conversion — 不可移动的指针(地址常数)转换77: Not a valid expression format type — 不合法的表达式格式78: Not an allowed type — 不允许使用的类型79: Numeric constant too large — 数值常太大80: Out of memory — 内存不够用81: Parameter xxx is never used — 能数xxx没有用到82: Pointer required on left side of -& — 符号-&的左边必须是指针83: Possible use of xxx before definition — 在定义之前就使用了xxx(警告)84: Possibly incorrect assignment — 赋值可能不正确85: Redeclaration of xxx — 重复定义了xxx86: Redefinition of xxx is not identical — xxx的两次定义不一致87: Register allocation failure — 寄存器定址失败88: Repeat count needs an lvalue — 重复计数需要逻辑值89: Size of structure or array not known — 结构体或数给大小不确定90: S — 语句后缺少&;&91: Structure or union syntax error — 结构体或联合体语法错误92: Structure size too large — 结构体尺寸太大93: Sub scripting missing ] — 下标缺少右方括号94: Superfluous & with function or array — 函数或数组中有多余的&&&95: Suspicious pointer conversion — 可疑的指针转换96: Symbol limit exceeded — 符号超限97: Too few parameters in call — 函数调用时的实参少于函数的参数不98: Too many default cases — Default太多(switch语句中一个)99: Too many error or warning messages — 错误或警告信息太多100: Too many type in declaration — 说明中类型太多101: Too much auto memory in function — 函数用到的局部存储太多102: Too much global data defined in file — 文件中全局数据太多103: Two consecutive dots — 两个连续的句点104: Type mismatch in parameter xxx — 参数xxx类型不匹配105: Type mismatch in redeclaration of xxx — xxx重定义的类型不匹配106: Unable to create output file xxx — 无法建立输出文件xxx107: Unable to open include file xxx — 无法打开被包含的文件xxx108: Unable to open input file xxx — 无法打开输入文件xxx109: Undefined label xxx — 没有定义的标号xxx110: Undefined structure xxx — 没有定义的结构xxx111: Undefined symbol xxx — 没有定义的符号xxx112: Unexpected end of file in comment started on line xxx — 从xxx行开始的注解尚未结束文件不能结束113: Unexpected end of file in conditional started on line xxx — 从xxx 开始的条件语句尚未结束文件不能结束114: Unknown assemble instruction — 未知的汇编结构115: Unknown option — 未知的操作116: Unknown preprocessor directive: xxx — 不认识的预处理命令xxx117: Unreachable code — 无路可达的代码118: Unterminated string or character constant — 字符串缺少引号119: User break — 用户强行中断了程序120: Void functions may not return a value — Void类型的函数不应有返回值121: Wrong number of arguments — 调用函数的参数数目错122: xxx not an argument — xxx不是参数123: xxx not part of structure — xxx不是结构体的一部分124: xxx statement missing ( — xxx语句缺少左括号125: xxx statement missing ) — xxx语句缺少右括号126: xx — xxx缺少分号127: xxx declared but never used — 说明了xxx但没有使用128: xxx is assigned a value which is never used — 给xxx赋了值但未用过
选D全局变量不在任何函数体内定义,作用域为整个文件;局部变量在函数体内定义,作用域仅为本次函数;static类型是静态变量,为了方便其他编译单元的引用,不能随意改变。
一个函数包含两部分:函数首和函数体,函数体包括花括号内的所有语句。———————————————————————————————希望答案能帮到你,要是你有疑问可以追问当然,采纳也是您的美德,谢谢
还是不明白为什么D错。还有C中,假如有个局部变量a=0,a++后变成1.。“不可能将局部变量的运算结果保存至下一次调用”
它说的不能保存的运算结果是0还是1???
其他2条回答
为您推荐:
其他类似问题
c语言的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。> 问题详情
下列说法中____不正确。A.高级语言的命令用英文单词来表示B.高级语言的语法很接近人类语言C.高级
悬赏:0&答案豆
提问人:匿名网友
发布时间:
下列说法中____不正确。A.高级语言的命令用英文单词来表示B.高级语言的语法很接近人类语言C.高级语言的执行速度比低级语言快D.同一高级语言可在不同形式的计算机上执行请帮忙给出正确答案和分析,谢谢!
您可能感兴趣的试题
1执行最快的语言是____。A.汇编语言B.COBOLC.机器语言D.PASCAL请帮忙给出正确答案和分析,谢谢!232位的个人计算机,一个字节(byte)由____位(bit)组成。A.4B.8C.16D.32请帮忙给出正确答案和分析,谢谢!3下列____不属于系统程序。A.数据库系统B.操作系统C.编译程序D.编辑程序请帮忙给出正确答案和分析,谢谢!4如何理解计算机体系结构和计算机组成?请帮忙给出正确答案和分析,谢谢!
我有更好的答案
请先输入下方的验证码查看最佳答案
图形验证:
验证码提交中……
每天只需0.4元
选择支付方式
支付宝付款
郑重提醒:支付后,系统自动为您完成注册
请使用微信扫码支付(元)
支付后,系统自动为您完成注册
遇到问题请联系在线客服QQ:
恭喜你被选中为
扫一扫-免费查看答案!
请您不要关闭此页面,支付完成后点击支付完成按钮
遇到问题请联系在线客服QQ:
恭喜您!升级VIP会员成功
提示:请截图保存您的账号信息,以方便日后登录使用。
常用邮箱:
用于找回密码
确认密码:百度题库旨在为考生提供高效的智能备考服务,全面覆盖中小学财会类、建筑工程、职业资格、医卫类、计算机类等领域。拥有优质丰富的学习资料和备考全阶段的高效服务,助您不断前行!
京ICP证号&&
京网文[3号&&
Copyright (C) 2018 Baidu帮忙写一条C语音命令_百度知道
帮忙写一条C语音命令
大神帮忙写一条按键就会加1的C语言命令
就是按下一个快捷键 完后命令加1
我有更好的答案
void main(){ i = 0; for(i = 0; ; ) { j = getchar();
if(j != '\n')
printf(&i=%d\n&,i);
} }上面这个程序必须按一个字符,再按回车。i加1
为您推荐:
其他类似问题
您可能关注的内容
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。C语言错误_百度知道
要求是这样的:
2、统计一组数据中正数、负数和零的个数。
从键盘输入一组整数(不超过20个),然后统计该组数中的正数、负数和零的个数并输出。
输入数据包括两行:第一行为需要输入的数据个数,第二行为一组数据(用空格分隔)
输出数据...
D:\Microsoft Visual Studio\123.cpp(5) : error C2057: expected constant expressionD:\Microsoft Visual Studio\123.cpp(5) : error C2466: cannot allocate an array of constant size 0D:\Microsoft Visual Studio\123.cpp(5) : error C2133: 'a' : unknown size执行 cl.exe 时出错.123.exe - 1 error(s), 0 warning(s)
我有更好的答案
C语言中不允许在定义数组时不指明数组元素个数或对数组元素个数做动态定义(即不允许元素个数是变量) 如:#include&stdio.h&int main(){scanf(&%d&,&a);int i[a];}报错。
采纳率:100%
float a[] 没有指定数组长度,
变成a[q]也没用啊
把你的错误提示贴出来
贴了,在上面
你把a[]改成a[20];q从0开始
这个是可以了,可是后面的for循环没用了
本回答被提问者采纳
1. Ambiguous operators need parentheses — 不明确的运算需要用括号括起 2. Ambiguous symbol 'xxx' — 不明确的符号 3. Argument list syntax error — 参数表语法错误 4. Array bounds missing — 丢失数组界限符5. Array size toolarge — 数组尺寸太大6. Bad character in paramenters — 参数中有不适当的字符 7. Bad file name format in include directive — 包含命令中文件名格式不正确 8. Bad ifdef directive synatax — 编译预处理ifdef有语法错 9. Bad undef directive syntax — 编译预处理undef有语法错 10. Bit field too large — 位字段太长 11. Call of non-function — 调用未定义的函数 12. Call to function with no prototype — 调用函数时没有函数的说明 13. Cannot modify a const object — 不允许修改常量对象 14. Case outside of switch — 漏掉了case 语句 15. Case syntax error — Case 语法错误16. Code has no effect — 代码不可能执行到17. Compound statement missing{ — 分程序漏掉&{& 18. Conflicting type modifiers — 不明确的类型说明符 19. Constant expression required — 要求常量表达式 20. Constant out of range in comparison — 在比较中常量超出范围 21. Conversion may lose significant digits — 转换时会丢失意义的数字 22. Conversion of near pointer not allowed — 不允许转换近指针 23. Could not find file 'xxx' — 找不到XXX文件24. D — 说明缺少&;& 25. Declaration syntax error — 说明中出现语法错误 26. Default outside of switch — Default 出现在switch语句之外27. Define directive needs an identifier — 定义编译预处理需要标识符 28. Division by zero — 用零作除数 29. Do statement must have while — Do-while语句中缺少while部分 30. Enum syntax error — 枚举类型语法错误 31. Enumeration constant syntax error — 枚举常数语法错误32. Error directive :xxx — 错误的编译预处理命令 33. Error writing output file — 写输出文件错误 34. Expression syntax error — 表达式语法错误 35. Extra parameter in call — 调用时出现多余错误 36. File name too long — 文件名太长 37. Function call missing ) — 函数调用缺少右括号 38. Fuction definition out of place — 函数定义位置错误 39. Fuction should return a value — 函数必需返回一个值 40. Goto statement missing label — Goto语句没有标号 41. Hexadecimal or octal constant too large — 16进制或8进制常数太大42. Illegal character 'x' — 非法字符x 43. Illegal initialization — 非法的初始化 44. Illegal octal digit — 非法的8进制数字 45. Illegal pointer subtraction — 非法的指针相减 46. Illegal structure operation — 非法的结构体操作 47. Illegal use of floating point — 非法的浮点运算 48. Illegal use of pointer — 指针使用非法 49. Improper use of a typedefsymbol — 类型定义符号使用不恰当50. In-line assembly not allowed — 不允许使用行间汇编 51. Incompatible storage class — 存储类别不相容 52. Incompatible type conversion — 不相容的类型转换 53. Incorrect number format — 错误的数据格式 54. Incorrect use of default — Default使用不当 55. Invalid indirection — 无效的间接运算 56. Invalid pointer addition — 指针相加无效 57. Irreducible expression tree — 无法执行的表达式运算 58. Lvalue required — 需要逻辑值0或非0值 59. Macro argument syntax error — 宏参数语法错误 60. Macro expansion too long — 宏的扩展以后太长 61. Mismatched number of parameters in definition — 定义中参数个数不匹配62. Misplaced break — 此处不应出现break语句 63. Misplaced continue — 此处不应出现continue语句 64. Misplaced decimal point — 此处不应出现小数点 65. Misplaced elif directive — 不应编译预处理elif 66. Misplaced else — 此处不应出现else 67. Misplaced else directive — 此处不应出现编译预处理else68. Misplaced endif directive — 此处不应出现编译预处理endif 69. Must be addressable — 必须是可以编址的 70. Must take address of memory location — 必须存储定位的地址71. No declaration for function 'xxx' — 没有函数xxx的说明 72. No stack — 缺少堆栈 73. No type information — 没有类型信息74. Non-portable pointer assignment — 不可移动的指针(地址常数)赋值75. Non-portable pointer comparison — 不可移动的指针(地址常数)比较 76. Non-portable pointer conversion — 不可移动的指针(地址常数)转换 77. Not a valid expression format type — 不合法的表达式格式 78. Not an allowed type — 不允许使用的类型 79. Numeric constant too large — 数值常太大 80. Out of memory — 内存不够用 81. Parameter 'xxx' is never used — 能数xxx没有用到82. Pointer required on left side of -& — 符号-&的左边必须是指针83. Possible use of 'xxx' before definition — 在定义之前就使用了xxx(警告) 84. Possibly incorrect assignment — 赋值可能不正确 85. Redeclaration of 'xxx' — 重复定义了xxx 86. Redefinition of 'xxx' is not identical — xxx的两次定义不一致87. Register allocation failure — 寄存器定址失败 88. Repeat count needs an lvalue — 重复计数需要逻辑值 89. Size of structure or array not known — 结构体或数给大小不确定 90. S — 语句后缺少&;& 91. Structure or union syntax error — 结构体或联合体语法错误92. Structure size too large — 结构体尺寸太大 93. Sub scripting missing ] — 下标缺少右方括号 94. Superfluous & with function or array — 函数或数组中有多余的&&&95. Suspicious pointer conversion — 可疑的指针转换 96. Symbol limit exceeded — 符号超限 97. Too few parameters in call — 函数调用时的实参少于函数的参数不98. Too many default cases — Default太多(switch语句中一个) 99. Too many error or warning messages — 错误或警告信息太多 100. Too many type in declaration — 说明中类型太多 101. Too much auto memory in function — 函数用到的局部存储太多 102. Too much global data defined in file — 文件中全局数据太多 103. Two consecutive dots — 两个连续的句点 104. Type mismatch in parameter xxx — 参数xxx类型不匹配 105. Type mismatch in redeclaration of 'xxx' — xxx重定义的类型不匹配 106. Unable to create output file 'xxx' — 无法建立输出文件xxx 107. Unable to open include file 'xxx' — 无法打开被包含的文件xxx 108. Unable to open input file 'xxx' — 无法打开输入文件xxx 109. Undefined label 'xxx' — 没有定义的标号xxx 110. Undefined structure 'xxx' — 没有定义的结构xxx 111. Undefined symbol 'xxx' — 没有定义的符号xxx 112. Unexpected end of file in comment started on line xxx — 从xxx行开始的注解尚未结束文件不能结束113. Unexpected end of file in conditional started on line xxx — 从xxx 开始的条件语句尚未结束文件不能结束 114. Unknown assemble instruction — 未知的汇编结构 115. Unknown option — 未知的操作 116. Unknown preprocessor directive: 'xxx' — 不认识的预处理命令xxx117. Unreachable code — 无路可达的代码 118. Unterminated string or character constant — 字符串缺少引号119. User break — 用户强行中断了程序 120. Void functions may not return a value — Void类型的函数不应有返回值 121. Wrong number of arguments — 调用函数的参数数目错 122. 'xxx' not an argument — xxx不是参数 123. 'xxx' not part of structure — xxx不是结构体的一部分124. xxx statement missing ( — xxx语句缺少左括号 125. xxx statement missing ) — xxx语句缺少右括号 126. xx — xxx缺少分号 127. xxx' declared but never used — 说明了xxx但没有使用 128. xxx' is assigned a value which is never used — 给xxx赋了值但未用过
float a[]是个指针吧不能直接拿来用,可以在printf(&请输入你的%d个数:\n&,i);之前把float a[] new出来a=new float[i];
指针是前面带*的吧
我没有运行你的程序,那个是指针数组
怎么可能!
你这样写是会错的,虽然说静态的数组无限大建议你使用静态数组:a[1000];动态数组:float *a=new [i];
你的错误有两处没有指定数组a的大小,动态指定大小可以把数组a的定义移动到scanf函数之后。这里就是scanf(&%d&,&i);float a[i];比较语句写成了赋值语句,比较应该是双等号'=='而不是'='。你这里每个都写成了赋值还有,关于main函数的返回值类型最好写成int类型的而不是void类型,因为没有哪个C标准允许过void main()这种写法
1条折叠回答
其他2条回答
为您推荐:
其他类似问题
c语言的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。

我要回帖

更多关于 ren 命令语法不正确 的文章

 

随机推荐