About 525,000 results
Open links in new tab
  1. How do I create an array of strings in C? - Stack Overflow

    Jul 7, 2009 · 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 2-d …

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

    May 6, 2012 · I'm trying to make an array of structs where each struct represents a celestial body. I don't have that much experience with structs, which is why I decided to try to use them …

  3. 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 …

  4. Returning an array using C - Stack Overflow

    Is the return array a known size as indicated in your code sample? The only other gotcha I see besides the stack issues mentioned in answers is that if your return array is an indeterminate …

  5. Zero an array in C code - Stack Overflow

    Nov 16, 2015 · Possible Duplicates: How to initialize an array to something in C without a loop? How to initialize an array in C How can I zero a known size of an array without using a for or …

  6. 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 …

  7. c - How can I use an array of function pointers? - Stack Overflow

    Initializing the array of pointers p[0] = sum and p[0] = &sum are equivalent. Similarly, when calling a function (via a function pointer) you do not need to dereference (*) it: See this Stack …

  8. Creating an array of int arrays in C? - Stack Overflow

    Mar 9, 2011 · EDIT 1 Please note that although I've showed by my example an array_of_arrays of length 3 I'm actually looking to create something that could contain a variable length of arrays.

  9. Declaring and initializing arrays in C - Stack Overflow

    Is there a way to declare first and then initialize an array in C? So far I have been initializing an array like this: int myArray[SIZE] = {1,2,3,4....}; But I need to do something like this int

  10. c - Array equal another array - Stack Overflow

    Feb 13, 2012 · I have a loop that goes something like this, where arrayfunction sets all array values and compute_with_both_arrays computes a number based on both these arrays. They …