在线C编程测验 [英] Online C Programming Quizzes

查看:70
本文介绍了在线C编程测验的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站是一系列测验的家园,从会计,

商业,数学到编程语言。这些是多种选择

类型的问题,你最后得到一张记分卡。


对于C语言,我有3套测验,欢迎任何人免费试用



C测验的问题很容易解决为专业C

程序员对于那些正在服用C的人来说第一次编程

课程会发现这些有用的评估他们的C

知识

访问 http://www.thinkanddone.com/exams/main.aspx

问候

Asad S. Yousaf

My site is home to series of quizzes ranging from Accounting,
Business, Math to programming languages. These are multiple choice
type questions and you get a score card at end.

For C language, I have 3 set of quizzes that anyone is welcome to try
online for free.
Questions on C quizzes are rather easy to solve for Professional C
programmers yet for those who are taking C as a first programming
course will find these useful in assesment their C
knowledge
Visit http://www.thinkanddone.com/exams/main.aspx
Regards
Asad S. Yousaf

推荐答案

2007年10月6日星期六00:22:53 -0700,Dexter写道:
On Sat, 06 Oct 2007 00:22:53 -0700, Dexter wrote:

我的网站是一系列测验的家园,从会计,

商业,数学到编程语言。这些是多种选择

类型的问题,你最后得到一张记分卡。


对于C语言,我有3套测验,欢迎任何人免费试用



C测验的问题很容易解决为专业C

程序员对于那些正在服用C的人来说第一次编程

课程会发现这些有用的评估他们的C

知识


访问 http://www.thinkanddone.com/exams/main.aspx



我在第一级发现了一些错误。

问题3是:

3。它给定变量x的值为5,以下哪个语句将输出消息我是对的

如果(x!= 5)printf(我是非常正确的);

if(x = 5)printf(我是对的);

这两个语句都会显示消息

以上都不是

第二个语句会将5分配给x(恰好已经

有这个值,但这是无关紧要的)并且,因为

的结果,赋值永远不会为零,它将执行由printf调用组成的表达式

语句。所以我检查了第二个

答案,但测试认为正确的答案是没有

以上。


-

Army1987(将NOSPAM替换为电子邮件)

汉堡包总比没有好。

什么都不是比永恒的幸福更好。

因此,汉堡包比永恒的幸福更好。

I found something wrong already at the first level.
Question 3 is:
3 . Its given that variable x has been assigned a value of 5, which of the following statement will output the message "I am quite right"
if (x!=5) printf("I am quite right");
if (x=5) printf("I am quite right");
both statements will display the message
none of the above
The second statement will assign 5 to x (which happens to already
have that value, but that''s irrelevant) and, since the result of
that assignment can never be zero, it will execute the expression
statement consisting of the printf call. So I checked the second
answer, but the test believes the correct answer to be "none of
the above".

--
Army1987 (Replace "NOSPAM" with "email")
A hamburger is better than nothing.
Nothing is better than eternal happiness.
Therefore, a hamburger is better than eternal happiness.


10月6日下午5:22 ,Dexter< yousaf.a ... @ gmail.comwrote:
On Oct 6, 5:22 pm, Dexter <yousaf.a...@gmail.comwrote:

我的网站是一系列测验的家园,范围从会计,

商业,数学到编程语言。这些是多种选择

类型的问题,你最后得到一张记分卡。


对于C语言,我有3套测验,欢迎任何人免费试用



C测验的问题很容易解决为专业C

程序员对于那些正在服用C的人来说第一个编程

课程会发现这些有用的评估他们的C

知识


Visithttp://www.thinkanddone.com /exams/main.aspx


问候


Asad S. Yousaf
My site is home to series of quizzes ranging from Accounting,
Business, Math to programming languages. These are multiple choice
type questions and you get a score card at end.

For C language, I have 3 set of quizzes that anyone is welcome to try
online for free.
Questions on C quizzes are rather easy to solve for Professional C
programmers yet for those who are taking C as a first programming
course will find these useful in assesment their C
knowledge

Visithttp://www.thinkanddone.com/exams/main.aspx

Regards

Asad S. Yousaf



有些问题的措辞可能更好,而且有些问题只是错误的。


---------- ----

数据集1

--------------


问题1州:AC计划是______________

(a)阵列的集合

(b)变量

(c)函数

(d)数据类型


这些答案都不是是正确的,尽管你声明(c)是

答案。 C程序不仅仅是一组函数。什么

关于对象声明?输入声明?正确的答案

应该是声明。


问题3说明:给定变量x已赋值为

of 5,以下哪个陈述将输出消息我是

非常正确


(a)if(x!= 5 )printf(我是对的);

(b)if(x = 5)printf(我是对的);

(c )两个陈述都会显示消息

(d)以上都不是


你给答案(d)作为正确答案,实际上是正确的

答案是(b)。记住,赋值表达式也有一个值...


问题6:我不喜欢这个问题的措辞。术语

赋值这里我认为不是很正确


---------------

数据集2

---------------


问题1:这可能只是一个语言障碍问题,但是

"字母"应该是字母


问题5:我不确定你是否应该如此教条使用<​​br />
的无限循环。如果你能避免它们,就不应该使用它们,但是我知道Linux使用它们很多。也许在某些情况下你需要

来使用它们......


问题8:这可能是一点点挑选,但我对
标准是实际上是空的*是*一个值,但它是一个空值

不能使用。我很想知道为什么使用这个

描述。为什么不说虚空意味着不返回任何价值


问题9:对不起,您的回答是错误的。你声明一个10

字符的数组。你可以在其中放入10个字符。答案不是9.

没有规则char的数组的最后一个元素必须是

null字符。即使有,空字符仍然是*

a字符!


--------------

数据集3

--------------


问题2:替换 ;命令"与指令


问题3:圆括号中包含的条件在哪里?


问题6:答案(d)是正确的,不回答(c)


问题7:答案(c)是正确的,但是goto不是循环

声明


问题8:函数* always *返回一个值。仅仅因为它是一个指针并不意味着它返回*很多*值


问题9:所有参数都是按值传递


问题10:12个字节不正确。该值是实现

定义的,因为一个结构可能在其成员之间或跟随最后一个成员之间有任意数量的填充。

问候,

B.

Some of the questions could be better worded, and some of the
questions are just plain wrong.

--------------
Dataset 1
--------------

Question 1 states: A C program is a collection of ______________
(a) arrays
(b) variables
(c) functions
(d) data types

Neither of these answers are correct, though you state that (c) is the
answer. A C program is more than a collection of functions. What
about object declarations? Type declarations? The correct answer
should be "declarations".

Question 3 states: Its given that variable x has been assigned a value
of 5, which of the following statement will output the message "I am
quite right"

(a) if (x!=5) printf("I am quite right");
(b) if (x=5) printf("I am quite right");
(c) both statements will display the message
(d) none of the above

You give answer (d) as the correct answer, when in fact the correct
answer is (b). Remember, assignment expressions have a value too...

Question 6: I don''t like the wording of this question. The term
"assignment" here I think is not really correct

---------------
Dataset 2
---------------

Question 1: This may just be a language barrier issue, but
"alphabets" should be "letters"

Question 5: I''m not sure that you should be so dogmatic about the use
of infinite loops. They should not be used if you can avoid them, but
I know Linux uses them a lot. Perhaps there are cases where you need
to use them...

Question 8: This may be bit-picking, but my interpretation of the
Standard is that void actually *is* a value, but it is an empty value
that cannot be used. I would be interested to know why this
description was used. Why not just say void means "returning no value"

Question 9: Sorry, your answer is wrong. You declare an array of 10
characters. You can fit 10 characters in it. The answer is not 9.
There is no rule that the last element of an array of char must be a
null character. And even if there was, the null character is *still*
a character!

--------------
Dataset 3
--------------

Question 2: Replace the word "commands" with "directives"

Question 3: Where is the condition contained in round brackets?

Question 6: Answer (d) is correct, not answer (c)

Question 7: Answer (c) is given as correct, but goto is not a loop
statement

Question 8: A function *always* returns one value. Just because it
is a pointer does not mean that it returns *many* values

Question 9: All arguments are pass by value

Question 10: 12 bytes is incorrect. The value is implementation
defined, because a structure may have any amount of padding between
its members or following the last member.
Regards,
B.


bo******* @ gmail.com 写道:
bo*******@gmail.com wrote:

问题8:这可能是一点点挑选,但我对

标准是实际上是空的*是*是一个值,但它是一个无法使用的空值


Question 8: This may be bit-picking, but my interpretation of the
Standard is that void actually *is* a value, but it is an empty value
that cannot be used.



void类型的表达式有一个不存在的值,

这是我的想法,

表示void类型的表达式没有价值。


N869

6.3.2.2无效

[#1] (不存在)void表达式的值(具有类型void的

表达式)不得以任何方式使用,

以及隐式或显式转换(void无效)将

不适用于此类表达。


-

pete

An expression of type void has a nonexistent value,
which to my way of thinking,
means that expressions of type void don''t have values.

N869
6.3.2.2 void
[#1] The (nonexistent) value of a void expression (an
expression that has type void) shall not be used in any way,
and implicit or explicit conversions (except to void) shall
not be applied to such an expression.

--
pete


这篇关于在线C编程测验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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