Questions tagged [array]
An array is a systematic arrangement of similar objects, usually in rows and columns.
223 questions
0
votes
2
answers
5k
views
How to efficiently store IP addresses? [closed]
Background
I have a requirement where I need to remove a few nodes in a network based upon a command given by the user. To keep the nodes from transmitting or receiving data I thought of changing its ...
6
votes
3
answers
547
views
Generating Deep Arrays: Shallow to Deep, Deep to Shallow or Bad idea?
I'm working on an array structure that will be used as the data source for a report template in a web app.
The data comes from relatively complex SQL queries that return one or many rows as one ...
-2
votes
4
answers
2k
views
C simple arrays and pointers question
So here's the confusion, let's say I declare an array of characters
char name[3] = "Sam";
and then I declare another array but this time using pointers
char * name = "Sam";
What's the difference ...
0
votes
3
answers
25k
views
2 Dimensional Arrays in C++
I started learning arrays in C++ and came over a little side note in the book talking about 2D arrays in breif.
I tested it out and i was amazed that it could give the programmer the ability to store ...
4
votes
3
answers
6k
views
C Flexible Arrays: When did they become part of the standard?
I learned to program in C many years ago, and used C steadily for about 10 years.
These days, I occasionally have to look at C code, because our Informix 4GL RDS customized runners also contain C ...
13
votes
8
answers
52k
views
What is the difference between an Array and a Stack?
According to Wikipedia, a stack:
is a last in, first out (LIFO) abstract data type and linear data structure.
While an array:
is a data structure consisting of a collection of elements (values or ...
6
votes
2
answers
5k
views
How to remove the boundary effects arising due to zero padding in scipy/numpy fft?
I have made a python code to smoothen a given signal using the Weierstrass transform, which is basically the convolution of a normalised gaussian with a signal.
The code is as follows:
#Importing ...
4
votes
3
answers
20k
views
Subscript binding and array categories
I am learning "Programming languages principles" and there is a lot of information about stuff which make up a programming language . Unfortunately every material I came across until now has a lot of ...
4
votes
3
answers
17k
views
Best practice Java - String array constant and indexing it
For string constants its usual to use a class with final String values. But whats the best practice for storing string array. I want to store different categories in a constant array and everytime a ...
4
votes
6
answers
3k
views
Why isn't the line count in Visual Studio zero-based? [closed]
This just struck me as an oversight by Microsoft. Since arrays and other data-structures within the .NET framework begin from zero (zero-based) why don't we have a line 0 within the code view in ...
4
votes
3
answers
3k
views
Lisp: Benefits of lists as code over arrays as code?
Question for lisp programmers:
Lisp code is lisp data, usually lists. Is there an advantage to code being lists over code being arrays?
Would macros be easier to write/faster to run?
You can ...
112
votes
39
answers
110k
views
Why are zero-based arrays the norm?
A question asked here reminded me of a discussion I had with a fellow programmer. He argued that zero-based arrays should be replaced with one-based arrays since arrays being zero-based is an ...