About 8,990,000 results
Open links in new tab
  1. How do I determine the size of my array in C? - Stack Overflow

    Sep 1, 2008 · To determine the size of your array in bytes, you can use the sizeof operator: int a[17]; size_t n = sizeof(a); On my computer, ints are 4 bytes long, so n is 68. To determine the …

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

  3. Define Array in C - Stack Overflow

    A definition of a variable (notice no extern), eg. byte numbers2[MAX_NUMBERS2]; is effectively telling the C compiler that there is an array variable called numbers2 and it should allocate the …

  4. How do I get the length of an array in C? - Stack Overflow

    Mar 11, 2015 · Closed 10 years ago. How can I get the length of an array in C, I tried it how i get it in other languages but it doesn't work like this: int array [5]; for(int i = 0; i < array.length; i++) {..

  5. c - How can I find the number of elements in an array? - Stack …

    I have an int array and I need to find the number of elements in it. I know it has something to do with sizeof but I'm not sure how to use it exactly.

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

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

  7. initial value of int array in C - Stack Overflow

    Dec 6, 2024 · 93 If the array is declared in a function, then the value is undefined. int x[10]; in a function means: take the ownership of 10-int-size area of memory without doing any …

  8. algorithm - Sorting an array in C? - Stack Overflow

    Which is the best sorting technique to sort the following array and if there are duplicates how to handle them: int a= {1,3,6,7,1,2}; Also which is the best sorting technique of all? void BubbleS...

  9. All possible array initialization syntaxes - Stack Overflow

    What are all the array initialization syntaxes that are possible with C#?

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