题目
题目

SWEN90010_2025_SM1 Practice Exam

多重下拉选择题

Consider the following Ada program. procedure Pointers is    X : access Integer := new Integer'(5);    Y : access Integer := X; begin    Y.all := 10; end Pointers; Variable Y is called an [ Select ] pointer duplicate reference alias for X because [ Select ] because X and Y refer to distinct (separate) memory locations because Y refers to the memory that holds the pointer X because X and Y are both pointers because X and Y both refer to the same memory location . After this program finishes executing, the statement "X.all = 5" is false

查看解析

查看解析

标准答案
Please login to view
思路分析
The question presents an Ada program and asks to fill in two blanks and evaluate a later statement. First, the prompt asks: Variable Y is called an [ Select ] [blank1] for X because [ Select ] [blank2] because X and Y refer to distinct (separate) memory locations, because Y refers to the memory that holds the pointer X, because X and Y are both pointers, because X and Y both refer to the same memory location. After this program finishes executing, the statement "X.all = 5" is false. Analyzing blank1 (the relationship between Y and X): - Option: alias. In Ada,......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!