Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Dynamic arrays and queues

Hardware interview practice

Dynamic arrays and queues

EasyData StructuresSystemVerilog

What is printed?

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 da[] = new[3];
int q[$] = '{10, 20};
initial $display("%0d %0d", da.size(), q.size());
Choose one

Answer choices

  1. A. 0 2
  2. B. Compilation error because queues have no size method
  3. C. 3 20
  4. D. 3 2
Continue practicing

Related questions

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