纠正答案 [英] Correcting answers

查看:69
本文介绍了纠正答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以为我纠正这些真假答案吗?我没有,但是我不知道他们是否都被纠正了。谢谢


真的。在C ++中,转换的单词与预定义的标识符相同。


错误。标识符可以是任何数字序列,字母和

下划线。


True。当试图在int变量中存储double值时,double

值将四舍五入到最近的整数。


False。 if语句不能嵌套在switch语句中,但是一个开关

语句可以嵌套在if语句中。


True。在while循环中执行break语句会终止

循环。


True。函数定义由函数标题和函数体*

组成。


True。参数允许程序员在每次调用

函数时使用不同的值。


False。在用户定义的函数中执行return语句

终止程序。


True。没有必要在

函数原型中指定形式参数的名称。


False。返回声明


返回x +1;


首先返回x的值,然后递增值

x。


是的。以下return语句返回值10.


返回10,16;


True。值返回函数中的以下语句是合法的。(

假设所有变量都已正确声明)


If(x%== 0)


返回x;


否则


返回x +1;


是的。鉴于功能原型


浮动测试();


声明


Cout<< ;测试;


合法,因为功能测试没有参数。


True。鉴于功能原型


Double testAlpha(int u,char v,double t);


以下声明是合法的。


Cout<< testAlpha(5,''A'',2);


错误。如果形式参数是值参数且相应的实际参数是变量,则可以修改实际参数。


False。如果是&符号,&附加到正式

参数的数据类型,相应的实际参数必须是变量。


True。值参数仅更改其自己的内容而不更改实际参数的

值。


True。变量名称可以传递给值参数。


False。参考参数的相应实际参数可以是

任何表达式


True。任何接收值并且还在

函数外发送值的参数必须声明为参考参数。


True。如果形式参数是参考参数,则相应的

实际参数必须是变量


True。如果调用代码是从函数接收值,则必须使用值传递机制。


True。在每个块之外声明的变量称为全局

变量。


True。在一个程序中,全局常量没有副作用。


错误。在函数体的外部块中声明的形式参数的范围和局部变量

的范围是相同的


True。在C ++中,函数定义不能嵌套,也就是说,一个函数的定义

不能包含在另一个函数的主体中。


True。静态变量与全局变量的工作方式相同,因为静态变量的内存仍然在程序执行期间分配。


True。以下是合法的C ++函数定义


Void funcTest(int& u,double& v);


{


Cout<< u<<"" "<<<<<< endl;


}


错误。 C ++代码的输出


Int alpha = 5;


Int beta = 10;


Alpha = alpha +5;


{


Int alpha;


Alpha = 20;


beta = beta +5;


}


Cout<< alpha< ;<" "<<<<<< endl;


是:10 15


是的。在C ++中,当将数组声明为形式参数时,必须在方括号内指定数组的大小。


True。单词const在数组声明之前用于函数

标题,以防止函数修改数组。


错误。结构可以通过值或

引用作为参数传递给函数。


True。函数不能返回类型struct的值


True。 Address运算符是一个urary运算符,它返回

的操作数地址。


True。任何数字都可以直接分配给指针变量。

解决方案

Richard写道:

任何人都可以纠正这些真实的我的错误回答?我没有,但是我没有b $ b

我不明白你的陈述我没有,但我不知道......

不知道他们是否都得到了纠正。谢谢
[...]




而且,不,我们不做家庭作业。


V




" Richard" <无******** @ yahoo.com>在消息中写道

新闻:ja ****************************** @ comcast.com。 ..

任何人都可以为我纠正这些真假答案吗?我没有,但我不知道他们是否都得到了纠正。谢谢

真的。在C ++中,与预定义标识符相同的单词。

错误。一个标识符可以是任何数字序列,字母和
下划线。




1)如果答案是正确,当你没有给b
$ b给出问题???


2)如果这是某种功课,我们不做在这里。


3)你写的很多东西拼写错误和/或没有意义。

第一个答案是一个很好的例子:重新拼写的单词与

预定义标识符相同。这是什么意思?


-Howard




" Howard" <人***** @ hotmail.com>在消息中写道

news:eT ******************** @ bgtnsc04-news.ops.worldnet.att.net ... < blockquote class =post_quotes>
" Richard" <无******** @ yahoo.com>在消息中写道
新闻:ja ****************************** @ comcast.com。 ..

任何人都可以为我纠正这些真假答案吗?我没有,但我不知道他们是否都得到了纠正。谢谢

真的。在C ++中,与预定义标识符相同的单词。

错误。标识符可以是任何数字序列,列表和
下划线。



1)如果答案是正确的,我们可能知道什么没有给出问题???




嗯......我猜那些_are_问题,答案是真/假<你在他们面前给你
?非常奇怪的方式列出问题和答案

这种情况​​......


-Howard


Can any one correct these true and false answer for me? I did not but I
don''t know if they are all corrected. THanks

True. In C++, resersed words the same as predefined identifiers.

False. An indentifier can be any sequence of digits, leters, and the
underscore.

True. When trying to store a double value in an int variable, the double
value is rounded to the nearest interger.

False. An if statement cannot be nested in a switch statement, but a switch
statement can be nested in an if statement.

True. The execution of a break statement in a while loop terminates the
loop.

True. A function definition consists of the function heading and the body of
the function.

True. Parameters allow the programmer to use different values each time the
functions is called.

False. The execution of the return statement in a user-defined function
terminates the program.

True. It is not necessary to specify the names of formal parameters in a
function prototype.

False. The return statement

Return x +1;

First returns the values of x and then increments the values of
x.

True. The following return statement return the value 10.

Return 10,16;

True. The following statement in a value-returning function is legal.(
assume that all variables are properly declared)

If (x%==0)

Return x;

Else

Return x +1;

True. Given the function prototype

Float test();

The statement

Cout<<test;

Is legal because the function test has no parameters.

True. Given the function prototype

Double testAlpha (int u, char v, double t);

The following statement is legal.

Cout<<testAlpha(5, ''A'', 2);

False. If a formal parameters is a value parameter and the corresponding
actual parameters is a variable, the actual parameter can be modified.

False. If an ampersand, & is attached to the data type of a formal
parameter, the corresponding actual parameter must be a variable.

True. A value parameter only changes its own content without changing the
value of the actual parameter.

True. A variable name can be passed to a value parameter.

False. The corresponding actual parameter for a reference parameter can be
any expression

True. Any parameter the receives a value and also sends a value outside the
function must be declared as reference parameter.

True. If a formal parameter is a reference parameter, the corresponding
actual parameter must be a varialble

True. The pass by value mechanism must be used if the calling code is to
receive values back from the function.

True. A variable declared outside of every block is called a global
variable.

True. In a program global constants have no side effects.

False. The scope of a formal parameter and the scope of a local variable
declared in the outer block of a function body is the same

True. In C++, function definitions cannot be nested, that is, the definition
of one function cannot be enclosed in the body of another function.

True. A static variable works the same way as global variable because memory
for the static variables remains allocated during program execution.

True. The following is a legal C++ function definition

Void funcTest(int& u, double& v);

{

Cout<<u<<" "<<v<<endl;

}

False. The output of the C++ code

Int alpha =5;

Int beta=10;

Alpha = alpha +5;

{

Int alpha;

Alpha=20;

beta= beta +5;

}

Cout<<alpha<<" "<<beta<<endl;

Is: 10 15

True. In C++ , when declaring an array as a formal parameter, the size of
the array must be specified within square brackets.

True. The word const is used before the array declaration in a function
heading to prevent the function from modifying the array.

False. A struct can be passed as a parameter to a function by value or by
reference.

True. A function cannot return a value of a type struct

True. The Address operator is a urary operator that returns the address of
its operand.

True. Any number can be directly assigned to a pointer variable.

解决方案

Richard wrote:

Can any one correct these true and false answer for me? I did not but I
I don''t understand your statement "I did not but I don''t know ..."
don''t know if they are all corrected. THanks
[...]



And, no, we don''t do homeworks.

V



"Richard" <no********@yahoo.com> wrote in message
news:ja******************************@comcast.com. ..

Can any one correct these true and false answer for me? I did not but I
don''t know if they are all corrected. THanks

True. In C++, resersed words the same as predefined identifiers.

False. An indentifier can be any sequence of digits, leters, and the
underscore.



1) How coud we possibly know if the answers are correct, when you haven''t
given the questions???

2) If this is some kind of homework, we don''t do that here.

3) A lot of what you''ve written is badly misspelled and/or makes no sense.
This first "answer" is a good example: "resersed words the same as
predefined identifiers". What does that mean?

-Howard



"Howard" <al*****@hotmail.com> wrote in message
news:eT********************@bgtnsc04-news.ops.worldnet.att.net...


"Richard" <no********@yahoo.com> wrote in message
news:ja******************************@comcast.com. ..

Can any one correct these true and false answer for me? I did not but I
don''t know if they are all corrected. THanks

True. In C++, resersed words the same as predefined identifiers.

False. An indentifier can be any sequence of digits, leters, and the
underscore.



1) How coud we possibly know if the answers are correct, when you haven''t
given the questions???



Hmm... I guess those _are_ the questions, and the answers are the true/false
you give before them? Very odd way of listing the questions and answers in
that case...

-Howard


这篇关于纠正答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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