2d-array tag

10 questions


1 answers
65 views
0
This is a question when setting up an array in a two-dimensional array.

#include <stdio.h>int main(void){ int a[20][20] = {}; int q,i,j,x,y; scanf(%d,&q); for(i = 0; i < q; i++) { scanf(%d %d,&x,&y); a[x][y] = 1; } for(i = 1; i < 21; i++) { for(...

2 years ago

1 answers
75 views
0
I want to know how to declare C language 2D array + pointer array!

int arr[2][3] = { {1,2,3},{4,5,6} }; int(*parr)[3];parr = arr;I'm not sure what int (*parr)[3]; means in the above code.The arr array declared in the first line consists of two rows and three rows(*pa...

2 years ago

1 answers
85 views
0
[C language] Input and output a string into a two-dimensional array

I'm trying to enter a string in a two-dimensional array, but it doesn't workIf the name of the two-dimensional array is matrix, is it correct that each character in the string is in matrix[i][j]?For e...


1 answers
82 views
0
Access violation during dynamic assignment of C language two-dimensional array

DYNAMIC ASSIGNMENT OF TWO-Exception occurred (0x00F55146, Project1.exe): 0xC0000005: Access violation occurred while reading location 0xFDFE01You have received the following message:#include<stdio....


2 answers
137 views
0
Two-dimensional array triangular error question

There's an error in writing down the two-dimensional array cedar coding in the book, but I can't find the reason.import java.util.*; public class Coderunner { public static void main(String[]args){ c...

2 years ago

1 answers
136 views
0
C language 2D array address and reference to value

Hello, I am a student studying programming, and I have a question while studying C language. int array[2][2] = {10,20,30,40}; Assuming that this arrangement exists, when you do printf(%x, array+1);The...

2 years ago

1 answers
127 views
0
I'm a beginner in language c. Two-dimensional array Walsall algorithm

I'm working on a code that can run the Walsall algorithm, but I don't get the answer I want from where it went wrong. For example, 2310001000041000001011110000When you do it, the result value should c...

2 years ago

2 answers
122 views
0
Error when specifying variable for index of empty double array using for loop - JavaScript

testOne = [['ex','ex','ex'],['ex','ex','ex'],['ex','ex','ex'],['ex','ex','ex'],['ex','ex','ex'],];xx = [];realCal = ['a','b','c']; for (let i = 0; i < testOne.length; i++) { xx[i] = realCal; xx...


2 answers
86 views
0
Why does int[][2]a become C as a parameter?

Hello, I'm a second-year undergraduate student who is studying alone after being discharged from the military and before returning to school.While solving the problem, C declared this structure.int so...

2 years ago

1 answers
129 views
0
It's a C++ question!

I'm a C++ beginner student.I wrote a function that generates random numbers from 0 to 9, creating a two-dimensional array of four rows and three rows, and I want to express the frequency of the number...

2 years ago

© 2024 OneMinuteCode. All rights reserved.