U E D R , A S I H C RSS

Programming Language Class/2006/End Term Examination

������

�� : 6�� ~ 11�� (concept of programming language 6th ed)
02, 05 �� ���� �������� ����해���� ���� �������������� �� ���� 했�� ���� �������� ����������. ������ ���� ���������� Pointer, Array, Abstraction, Subprogram �� ������ ������ ���� ���� �� 함.
���� �������� ������ �������� ���� �� ������.

�� ������� ���� ���� �� ������ ������ 1��������. -_-;

����

1. True, False 판�� ���� ����
a) c�������, switch���� ���� �� ���� ordinal type�� ������ �� ����?
b) ������ ����������� 파������� ������형�� ��해�� ���� ����.
c) C���� ���� ��파 ��하�� ����.
d) if��� Dijkstra's Guarded Command ��� Boolean Expression �� ����한 �� ���� ������ ���� �������� ���� ����
e) Ada ��� for loop ����한 iteration ����. ��� ����� condition variable ������ ���� ����.

2. ������ ���� ����
~cpp
void fun(A, B, C, D)
{
 A = A + A;
 D = A + C
 return
}
.
.
.

X = 2, Y = 3, Z = 6
fun(X, X, X+Y, Z)
print Z;
a) ���� ������� fun 함���� 파����� ������ Pass-By-Value, Pass-By-Name �� ������ �������� ���� ����� (������ �� ��한���� 확��하 ����. -_-;; ������ ����하�� ���� ㅋㅋ)
b) �� ������ ������ ��� ���� ��하.

3. operator ������ ���한 functional side effects����
a) functional side effects�� ���� ������.
b) ������ ������ �� SUM�� �� ������. (evaluation order is left-to-right)
~cpp
int fun(int *i)
{
*i += 3;
return 2*(*i)-1;   
}

int i = 10, j =16
SUM = fun(&i) + fun(&j) +(i+j)/2
// ��험 ���� �� ������ ������ ()�� 평 �� function evaluation �� �� ������ 헷���� 했��
// C �������� �� function evaluation �� ����, ���� ���� left-to-right �� ������ �� �� ��함.
4.
a) �� ���� ������ Static-Chain ������ ����
b) ���� ���������� Static-Chain �� � display ���� 택하�� ���� ���� ����하����.
c) display �� ������. (Qsd = Psd, Qsd < Psd, Qsd > Psd ������. 5판�� ���한 ��������)

1.
d)
���� ������ selector, loop ���� ������ ������ ������ �� ����해��. (����)
����� ���� ��� ���� ����, ��������� ��� ��������.

e)
  • upto terminate 해�� ������ ���� ���� �� -> �� True, ���� ���� ���한���� �� False

~cpp
for variable in [reverse] discrete_range loop
...
end loop
// reverse 키���� ���� �������� ���� �������� ����할 ��
������ upto �� ������ ���� �� ����하�� ���� ������ ������ ��확한 �� ��하�� 힘�� ���� ������, ���� ��� ��확�� �� ������ ���� ������.


up to ... (1) <���� �·��·������> �(��), ��� ������;< ��> ��� ������:up to this time[now] ����, ��[�� ��]��/I am up to the ninth lesson. ���� �� 9 ���� ����./He counted from one up to thirty. ���� 1��� 30 ����./He worked his way up to company president. ���� �� 회���� ������ ���했��. (2) [�� ����·���������] ������� < > ����, ��� ����[할 �� �� ���� ������]:You��re not up to the job. �� ��  �� ��한��./This novel isn��t up to his best. �� �� ���� ����������  ��한��./This camera is not up to much. �������� ���� �� ��한 �� ����./Do you feel up to going out today? ���� ����할 �� �� �� �������? ��������� ���� ���� (3) ������� <���� ��>�� �� ��;� ��:He is up to something[no good]. ���� ����[�� ��]  �� ����./What are they up to? ���� ���� ������ ����? (4) ������� <������> 해 할, �����, ��� ������:It��s up to him to support his mother. ������ ������ ��해��./I��ll leave it up to you. ���� �� ������./It��s up to you whether to go or not. �� ������ ���� ���� ����./The final choice is up to you. ���� �택 ���� ���� ����.
- �� ����

----
ProgrammingLanguageClass
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:24:02
Processing time 0.0162 sec