matrices without size in C

Asked

Viewed 25 times

0

I have a doubt that came to me while learning about matrices of a dimension (no size). Follow an example:

#include <stdio.h>

int main(){
    int matriz[] = {1,2,3};
}

My question is: and if I then want to add elements to this list by putting, for example, 10 elements instead of 3, there will be no memory breach problem? What is the advantage of using matrices with no set size? Thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.