альтернатива физзбаззу
May. 13th, 2013 01:17 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Цитирую из подзамочной записи с разрешения автора, который работает в американской компании и интервьюирует программистов:
Интесная закономерность выявляется. Мы начинаем интервью с того, что просим кандидата прочитать вот такой код, и сказать, что он делает. Как бы он назвал эту функцию?
private static int ok(int a, int b) {
while (a >= b) a -= b;
return a;
}
Пока результаты такие, что после этого вопроса интервью можно заканчивать. Если человек отвечает нормально на этот вопрос, то и дальше отвечает нормально. Если вообще близко не может понять о чем речь, то дальше только хуже.
no subject
Date: 2013-05-13 10:01 am (UTC)http://en.wikipedia.org/wiki/C_data_types
no subject
Date: 2013-05-13 10:38 am (UTC)no subject
Date: 2013-05-13 10:59 am (UTC)no subject
Date: 2013-05-13 11:25 am (UTC)Параграф '3.1.2.5 Types' (вообще не упоминает слово byte):
An object declared as type char is large enough to store any member of the basic execution character set.
Параграф '1.6 DEFINITIONS OF TERMS':
Byte --- the unit of data storage in the execution environment large enough to hold any member of the basic character set of the execution environment.
Каждый из них "large enough", но про одинаковость - ни слова.
no subject
Date: 2013-05-13 11:27 am (UTC)Параграф '3.1.2.5 Types' (вообще не упоминает слово byte):
An object declared as type char is large enough to store any member of the basic execution character set.
Параграф '1.6 DEFINITIONS OF TERMS':
Byte --- the unit of data storage in the execution environment large enough to hold any member of the basic character set of the execution environment.
Каждый из них "large enough", но про одинаковость - ни слова.
no subject
Date: 2013-05-13 01:09 pm (UTC)no subject
Date: 2013-05-13 01:40 pm (UTC)no subject
Date: 2013-05-13 01:46 pm (UTC)no subject
Date: 2013-05-13 02:42 pm (UTC)UPD: нашел драфт С89, а там
Character --- a single byte representing a member of the basic character
set of either the source or the execution environment.
...
The sizeof operator yields the size (in bytes) of its operand,
which may be an expression or the parenthesized name of a type. The
size is determined from the type of the operand, which is not itself
evaluated. The result is an integer constant.
When applied to an operand that has type char , unsigned char , or
signed char , (or a qualified version thereof) the result is 1.
no subject
Date: 2013-05-13 03:18 pm (UTC)