You are using the C99 variable length array feature to define the size of
col_num are both zero, meaning neither “dimension” has any storage allocated. When you attempt to write into the array, because no storage was reserved for it, you are writing past the end and triggering undefined behavior that is manifesting as a segfault.
It looks like you have
col_max defined as constants; perhaps you meant to use those instead of
col_num when defining