Hello, I have a question maybe more conceptual than practical, about the char variables. Suppose the next scenario
It works well, or for that sample situation it works well. My question is about the 2nd line on the 'test()' function: the char name[size], will do a 'malloc' each function call (or something internal like a mem allocation)? If yes, how can I know when there's enought memory (like the 'malloc' that returns null value)? Should I have to test if the buffer created is null? (I'm afraid that it will crash the program directly).
//compiled as *c with MingW on DevCpp IDE
void test(char *txt,int i,int f)
test("That's a test.",0,6);
test("That's a test.",7,8);
test("That's a test.",9,13);
Thank's in advance