#CCBCHBAHAI0000123. Phân loại truy cập a[-1] (Classify the Access a[-1])
Phân loại truy cập a[-1] (Classify the Access a[-1])
Classify the Access a[-1]
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
An array contains exactly elements indexed from through . Consider the expression a[-1].
A negative index is outside the array's valid index range. Classify this access under the C array rules. Do not predict any value from memory before the array.
Input
One line contains the integer .
Output
Print exactly UNDEFINED_BEHAVIOR.
Subtasks
Subtask 1 (100 points): .
Examples
Input
8
Output
UNDEFINED_BEHAVIOR
Explanation
For , valid indices are through . Index is below the lower bound , so a[-1] is outside the array. Reading through this access has no defined result in C and a program must not rely on an accidental memory value.