在线C ++编程测试 [英] On-Line C++ Programming Tests

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

问题描述

我已经做了13年的C ++并且被要求参加在线C ++

编程测试。


什么是招呼!!! br />

对于一个明显比你知道的人来说,接受测试是令人沮丧的...... b $ b ...并且不知道写这样的话。一个测试。


例如


问题10:


分配的字节大小是多少对于SomeClass类型的对象?

class SomeClass

{

public:

int x;

int y;

};

I have been doing C++ for 13 years and was asked to take an online-C++
programming test.

WHAT A JOKE!!!

It''s frustrating taking a test by someone who obviously knows less than you
do....and doesn''t know enough to write such a test.

e.g.

Question 10:

What is the size in bytes allocated for objects of the type SomeClass?
class SomeClass
{
public:
int x ;
int y ;
} ;

推荐答案



"史蒂夫福克斯" < XX ** @ null.com>在消息中写道

news:XHEPf.12858

"Steve Fox" <xx**@null.com> wrote in message
news:XHEPf.12858


eP4.690@trnddc05 ...
eP4.690@trnddc05...
我一直在做C ++ for 13多年来被要求参加在线C ++
编程测试。

什么笑!


大多数在线C ++''测试''是。

对于一个明显知道不及你的人进行测试是令人沮丧的
做....并且不知道写这样的测试。


欢迎来到真实世界(tm):-)

例如

问题10:
为SomeClass类型的对象分配的字节大小是多少?

class SomeClass
公共:
int x;
int y;
};
I have been doing C++ for 13 years and was asked to take an online-C++
programming test.

WHAT A JOKE!!!
Most online C++ ''tests'' are.

It''s frustrating taking a test by someone who obviously knows less than
you
do....and doesn''t know enough to write such a test.
Welcome to the Real World(tm) :-)

e.g.

Question 10:

What is the size in bytes allocated for objects of the type SomeClass?
class SomeClass
{
public:
int x ;
int y ;
} ;




我不知道他们的答案是什么,但真正的答案是:

sizeof(SomeClass)> = 4

-Mike



I don''t know what ''their'' answer is, but the real answer is:

sizeof(SomeClass) >= 4
-Mike


Mike Wahler写道:
Mike Wahler wrote:
为SomeClass类型的对象分配的字节大小是多少?

class SomeClass
{
public:
int x;
int y;
};
What is the size in bytes allocated for objects of the type SomeClass?
class SomeClass
{
public:
int x ;
int y ;
} ;



我不知道他们的回答是什么,但真正的答案是:

sizeof(SomeClass)> = 4



I don''t know what ''their'' answer is, but the real answer is:

sizeof(SomeClass) >= 4




不。 ''sizeof(SomeClass)> = 2'':在''sizeof(int)'的平台上'

与''sizeof(char)'相同'没有必要浪费两个

额外的话。当然,这样的平台每个char可能会使用至少16位

,甚至更多(例如32或64)。公平地说,

我从来没有在这样的机器上工作。

-

< mailto:di ****** *****@yahoo.com> < http://www.dietmar-kuehl.de/>

< http://www.eai-systems.com> - 高效的人工智能



Nope. ''sizeof(SomeClass) >= 2'': on platforms for ''sizeof(int)''
is identical to ''sizeof(char)'' there is no need to waste two
extra words. Of course, such platforms will use at least 16 bits
for each ''char'' probably even more (e.g. 32 or 64). To be fair,
I have never worked on such a machine.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.eai-systems.com> - Efficient Artificial Intelligence


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

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