
How do I determine the size of my array in C? - Stack Overflow
Sep 1, 2008 · An array sent as a parameter to a function is treated as a pointer, so sizeof will return the pointer's size, instead of the array's. Thus, inside functions this method does not work. Instead, …
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 2-d array of …
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 size, given the …
How do you replace multiple elements of an array in C with elements …
Dec 14, 2025 · If I wanted to replace large chunks of an array in C with items from another list, are there any solutions that don't involve for loops or writing code like the following? int64_t foo[size]; foo[va...
c - How can I find the number of elements in an array? - Stack Overflow
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.
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:
All possible array initialization syntaxes - Stack Overflow
What are all the array initialization syntaxes that are possible with C#?
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...
Passing an array as an argument to a function in C
Jul 4, 2011 · In C, except for a few special cases, an array reference always "decays" to a pointer to the first element of the array. Therefore, it isn't possible to pass an array "by value".
c# - Declare a const array - Stack Overflow
101 You can't create a 'const' array because arrays are objects and can only be created at runtime and const entities are resolved at compile time. What you can do instead is to declare your array as …