what is the difference between those two types of arrays, thanks in advance for any good example taken from different languages
In C/C++ a flexible array is a member of a struct that is an array (not just a pointer) but doesn't specify a length (reference). As such, a struct with a flexible array is an incomplete type, so the typeof operator can't be used.
A dynamic array is an ordered collection (list) that can grow and shrink. Dynamic arrays are usually implemented as a linked list or something similar.