array tag

224 questions


1 answers
36 views
0
Syntax error to make 2D array.

int[][] multD = new int[5][];multD[0] = new int[10];인터넷에서 5x10배열 만드는 소스라고 이런 소스를 봤는데 문법에러가 납니다.Why is that?


1 answers
46 views
0
To sort values by java Array size

package practice_3;import javax.swing.JOptionPane;public class ArrayExcercise1 {public static void main(String[]args) { int[] list = new int[10]; String print = ; for (int i = 0; i<list.length; i+...

2 years ago

1 answers
37 views
0
What does %w do?

I was looking at the FileUtils data and saw this codeFileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'I wonder what %w is doing here.

2 years ago

1 answers
47 views
0
I am studying array in Java. I have a question because it doesn't print out.

public class TestArrays {public static void main(String[]args) { int [] index = new int[4]; index[0]=1; index[1]=3; index[2]=0; index[3]=2; String[] islands = new String[4]; islands[0]=Bermuda; island...

2 years ago

1 answers
39 views
0
It's really easy, but why can't I type it right in the array?

Sorry for easy questions....#include <stdio.h>int bs[200]={0}, gs[200]={0};int n, k;int i, j;int main(void){ scanf(%d, &n); scanf(%d,&k); printf(%d, n); for(i=1;i<=n;i++){ scanf(%d\n...

2 years ago

1 answers
123 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
86 views
0
This is a question when you define the initial expression of the c language for statement as an array.

void dice(int count) { int i; if (n < count) { print(n); return; } for (i = arr[count - 1]; i <= 6; i++) { arr[count] = i; dice(count + 1); }}This is.Looking at this code, count gave the par...

2 years ago

3 answers
119 views
0
c Language array initialization question.

When you initialize an array, you can't say intarr[100] = {1, 1, 1, 1, 1...} if there are more than 100 arrays, right? So if you give intarr[100] = {1};, all of these have to be initialized to 1 in a ...

2 years ago

2 answers
47 views
0
(C language) I'm trying to use a pointer using the parameters I got from the function, but it turned off right away without a compilation error, so I can't catch the error

#include<stdio.h>int leaf(int *arr,int len){ int **k ; k = &arr; **(k+1)=2;// Put the secondary pointer and put the address of the arr, and it bounces}int main(){ int ab[] = {1,5,5,4,5,8,7,7...

2 years ago

1 answers
37 views
0
cLanguage array string question

I can get a text message for each array element, right?It can be easily implemented as a for statementI saw several examples of text messages When I receive the text in scanf, there are a few things t...

2 years ago
« - 19 - »

© 2024 OneMinuteCode. All rights reserved.