Event scheduling in Verilog

module main;
int x;
initial begin
$monitor(“x is %0d”,x);
fork
#0 x = 5; // inactive event
x = 3; // active event
join
end
endmodule
I am running the above code getting output x = 5.
both blocking statements are executing parallely but the region of executing is different.that’s why it shows x = 5. is to write. according to the verilog event queue first active region and inactive region.please provide the correct reason for above output.

In reply to anvesh dangeti:

This is because $monitor command is executed in postponed region of current time slot. Hence it will display the last vale of x, which in your case happens to be of x=5(evaluated in Inactive region)