I am very certain that I saw the syntax for what I want to do on this website a while ago, but I cannot find it anymore and I forgot what it was. Say I wanted to store the values from 1 to a 100 in an array. What would be the syntax without using a loop. I remember the syntax being something like this:
int line [] = {1 .. 100};
What is the correct syntax?
UPDATE: I figured out what I meant by this question. What I read a while ago was the syntax to have all the elements in an array equal to a number. For example, in a GCC compiler, you can set all the elements in an array equal to zero like this:
int line [10] = {[0 ... 9] = 0};
By doing this, all the elements in the array will be equal to 0. It is a very useful thing to know in my opinion and much easier than using a for-loop.