Nice explanation. Doubt : Is there any way to delete the particular element in specified index in an array bcz delete method is deleting entire array elements?
No. For dunamic array there is no way.(Thats why we have queue for addition and deletion)But for associative array we can use array.delete(index_num); You can use this if you really want array element to be deleted:(applies for both fixed and dynamic) int array []; int queue[$]; //-----initial block-----// array = new[5]; array = '{5, 10, 15, 20, 25}; queue=array;//assign array to queue queue.delete(3);//call delete method of queue with desired index value. //---------------------------------------// Thank you.
❤ nice explanation madam
Thank you 👍💛
Most welcome madam but one more request please make video on UVM also
I think ig we will not get error if we store less than 5 values 0:24
It will give error if u store greater than or less than the size of an fixed size array. It should match with the size of an array. Please do check.
Is this C lang.?
Nice explanation. Doubt : Is there any way to delete the particular element in specified index in an array bcz delete method is deleting entire array elements?
No. For dunamic array there is no way.(Thats why we have queue for addition and deletion)But for associative array we can use array.delete(index_num);
You can use this if you really want array element to be deleted:(applies for both fixed and dynamic)
int array [];
int queue[$];
//-----initial block-----//
array = new[5];
array = '{5, 10, 15, 20, 25};
queue=array;//assign array to queue
queue.delete(3);//call delete method of queue with desired index value.
//---------------------------------------//
Thank you.