About 1,430,000 results
Open links in new tab
  1. c - How can I initialize all members of an array to the same value ...

    memset for an int array only works for very specific values, namely 128 multiples of 0x01010101 and their complements, Setting to -1 does initialize all elements of the array to -1 on machines …

  2. How do I create an array of strings in C? - Stack Overflow

    Jul 7, 2009 · 251 There are several ways to create an array of strings in C. If all the strings are going to be the same length (or at least have the same maximum length), you simply declare a …

  3. C: How to correctly declare an array of strings? - Stack Overflow

    Jul 29, 2009 · A string literal has type 'array of n char' so can be converted to a pointer whereas an initializer list isn't actually an array, it's just a way to initialize arrays.

  4. C dynamically growing array - Stack Overflow

    Aug 21, 2010 · I have a program that reads a "raw" list of in-game entities, and I intend to make an array holding an index number (int) of an indeterminate number of entities, for processing …

  5. How do you make an array of structs in C? - Stack Overflow

    May 6, 2012 · 28 Another way of initializing an array of structs is to initialize the array members explicitly. This approach is useful and simple if there aren't too many struct and array …

  6. How to create an array of strings in C? - Stack Overflow

    Mar 1, 2013 · 12 If you need an array of strings. There are two ways: 1. Two Dimensional Array of characters In this case, you will have to know the size of your strings beforehand. It looks like …

  7. How to make an array return type from C function?

    Jan 13, 2013 · 19 I have tried to return the array name as shown below. Basically I am trying to make the function test return an array that can be used in main. Could you advise me as to …

  8. c++ - Current status of std::make_array - Stack Overflow

    Jun 20, 2018 · What is the current status of std::make_array function proposed here? I cannot find any information about its potential acceptance. According to cppreference.com, it's in the …

  9. How do I declare an array of undefined or no initial size?

    An array in C is just a sequence of values in adjacent memory. array[1] is just next to array[0]. So when we allocate a big block of memory and want to use it as an array, we need an easy way …

  10. What is the best way to make 2 dimensional array in C

    Apr 27, 2020 · I want to make a 2 dimensional array in C. I know 1 way to make it like this.