Questions tagged [dimensional]

This tag is deprecated, use the correct tags instead: Questions related to multi[dimensional] [arrays] should use the tag [multidimensional-array], use [multidimensional] for the specific data structures, or [dimensional-modeling] for the mathematical analysis with data. Otherwise, use [dimension] where relevant.

This tag is deprecated! Please consider using the correct tags instead:

115 questions
-1
votes
1 answer

How to make functions (remove_by_index, remove_by_val) in C

I wonder how to make 2 functions based of this code: #include #include typedef struct node { int val; struct node * next; } node_t; node_t* create_node(int val) { node_t * head = NULL; head =…
-1
votes
1 answer

Why does this code not produce a square 2d-array? What makes it become triangular?

I'm trying to print a square two-dimensional array of 0s. I don't understand why I keep getting a triangular shape with this code. Why is it that with each ROW I print, I print one less column? def ar(i): j = i for i in range(i): for…
-1
votes
3 answers

How to reset two-dimensional array to its original form after sorting?

I am trying to reset 2D array to its original form after it's been sorted with a bubble sort. I need to reset it back to what it was before sorting. How do I do it? In case you have a question why an array is global. It's a school assignment and…
Maria
  • 17
  • 2
-1
votes
2 answers

2 dimensional array of class objects in Javascript

Trying to make an array of class objects in JS. I don't know how Javascript handles this but instead of a 10x10 grid, all numbers are set to 10 instead of the i and j values I want to assign. class Box { constructor(width, height, x, y, inside)…
John G
  • 15
  • 7
-1
votes
1 answer

Copy array full of integers into another array

public static void copyList(int[]list) { int [] copyList = new int[list.length]; //define new array for(int i = 0; i < list.length; i++){ copylist[i] = list[i]; } System.out.println("The copy is: " + Arrays.toString(copyList)…
-1
votes
1 answer

two dimensional vector

I wanted to have a linked list of nodes with below structure. struct node { string word; string color; node *next; } for some reasons I decided to use vector instead of list.my question is that is it possible to…
vahidzolf
  • 109
  • 1
  • 1
  • 13
-1
votes
1 answer

Dimensional array - 3 tables into HTML

I'm trying to display the content from 3 different mysql tables, clients, orders. products with the html structure: Product 1 Product 2 Product 3 ..... client 1 quantityOrder quantityOrder - client 2 …
-2
votes
1 answer

String to 2 dimensional int array?

I've a combobox, I am using an Action Listener. Inside of that function if item: 1 or 2 etc... was selected it finds that maze which is saved in a database, it points to a Java Class. I put the maze in the maze_map variable. Here ->…
-2
votes
1 answer

Write the required code to create a dynamic one dimensional integer array

I'm not sure how to answer this question or what it ask exactly for. Q:Write the required code to create a dynamic one dimensional integer array. So does it ask just to make dynamic 1D array like this: new int [5] or new int [size] or it ask…
-2
votes
2 answers

Dereferencing a Two Dimensional Array In C

I'm having some difficulties understanding two dimensional arrays in C. Let's look at this example: #include void foo(int arr[2][3]) { printf("%d", *arr); } int main() { int arr[2][3] = { {10, 20, 30}, …
Mike T
  • 21
  • 2
-2
votes
1 answer

Multiplying two one-dimensional arrays

A quick question that bugs me (both from a mathematical perspective and implementation-wise). How do you multiply two one-dimensional arrays? If we have: int[] a = {1,2,3}; int[] b = {4,5,6}; And we wanna put the result into a variable c, how do…
tudor balus
  • 149
  • 2
  • 10
-2
votes
1 answer

how multiply two dimensional array aka matrix

I want to know how to multiply 2D arrays (matrices) and show them as a matrix. The current output is 1 1 1 1 1 1 1 1 1 which is not the correct result. The code is below: static void Main(string[] args) { int[,] metrix1 = new int[3,…
user7201966
  • 1
  • 1
  • 1
-2
votes
3 answers

Printing out 2-dimensional arrays in C

I am a new CS student and am having a hard time understanding 2 dimensional arrays. Right now I am just trying to print it out 1 row at a time. This is my code #include #define N 3 int main(void) { int array[N][N], i, j, rows[N],…
Mike
  • 318
  • 2
  • 4
  • 13
-2
votes
3 answers

How to use C# convert 2 dimensional array string[,] to string

I have 2-d array var temp = new string[,] { { "1", "2", "3" }, { "4", "5", "6" }, { "7", "8", "9" } }; remind: string[,] != string[][] I want to convert to ... 123 456 789 How to fast convert in this case ?
Kevin Chang
  • 57
  • 1
  • 7
-2
votes
2 answers

Multiplying two dimensional arrays

how to multiply two dimensional a(5,3) and b (3,5) so the arry c( , )= a(5,3) and b (3,5) the first row of arry a * the columns of arry b then the second row of arry a * the columns of arry b then [EDIT] the code of your comment: Dim arry1(5, 3) As…
Kazem
  • 1
  • 4