DescriptionQ179
Q179FWASIC interview problem
Dynamic-array resizing
TechniquesSystemVerilogContainer operations
DifficultyEasy
TopicData Structures
LanguageSystemVerilog
Format4 choices
01
Problem
What does the display print?
Starting declarationSystemVerilog
int da[];
initial begin
da = new[3];
da = '{1, 2, 3};
da = new[5](da);
$display("%0d %0d %0d", da.size(), da[2], da[4]);
end02
