Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Associative arrays

Hardware interview practice

Associative arrays

EasyData StructuresSystemVerilog

What does the display print?

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

int aa[string];
initial begin
  aa["x"] = 7;
  $display("%0d %0d", aa.exists("y"), aa.num());
end
Choose one

Answer choices

  1. A. 0 1
  2. B. 0 0
  3. C. 1 1
  4. D. x 1
Continue practicing

Related questions

Data StructuresDynamic arrays and queues→Data StructuresPacked and unpacked arrays→
asic.fyi · Learn silicon end to end.info@asic.fyi