array tag

224 questions


1 answers
43 views
0
I have a question about the pointer operation.

In a 32-bit architecture, how does this code output?#include <stdio.h>int main(void) { int x[4]; printf(%p\n, (void*) (x)); printf(%p\n, (void*) (x + 1)); printf(%p\n, (void*) (&x)); printf(...

2 years ago

1 answers
41 views
0
Can we declare an array in one line?

String[] strs = {blah, hey, yo};m(strs);The above code delivers the String list to the m()method, but I don't want to declare an array of strings, so can I make this code one line?

2 years ago

1 answers
45 views
0
JAVA string arrangement again."T"

package com.javalec.ex;import java.io.StreamCorruptedException;import java.util.Scanner;import java.util.Stack;public class ArrayEx { public static void main(String[] args) { String[] name = {Yoona, T...

2 years ago

1 answers
44 views
0
C++ array and pointer *This is a question related to arithmetic

#include <stdio.h>#include <conio.h>int main(){ int a[3][5] = { {1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15} }; printf(%d, (a + 1)); printf(\n%d, *(a + 1)); _getch();}The res...


1 answers
44 views
0
Why doesn't the C/C++ compiler give an error even if you put b[4] in a function that takes a[1] as a factor?

#include<iostream>using namespace std;int dis(char a[1]){ int length = strlen(a); char c = a[2]; return length;}int main(){ char b[4] = abc; int c = dis(b); cout << c; return 0;}I'm asking...

2 years ago

1 answers
118 views
0
I assigned an array with new, but the last value of the array cannot be entered.

#include <iostream> using namespace std ; class Matrix { int** values; int row, column; public: Matrix(int row = 0, int column = 0) { this->row = row; this->column = column ; } Matrix ...


1 answers
70 views
0
Arduino uint8_t sensor value char array storage

void scan_rows(uint8_t *rows){ char A[65]; int i; uint8_t z,u,b; Serial.print(); for(z=0; z<8; z++){ if(z) { pinMode(z+29,INPUT); } pinMode(z+30,OUTPUT); digitalWrite(z+30,LOW); for(u=22; u<=29;...

2 years ago

1 answers
40 views
0
How to remove specific elements of an array from JavaScript

There's an integer type array. I added an element to the .push() method. Isn't there the simplest way to remove certain elements of an array? array.remove(int); like this.I'm not using any framework, ...

2 years ago

1 answers
112 views
0
Can I change List to int[]?

I'm learning Java. Can I change the list to int[]? There is a method called List.toArray(), but the return data type is Object[]. I want to get an Integer[] or an int[] What should I do?Right now, I'm...

2 years ago

1 answers
79 views
0
Javascript: How do you turn an array into an object?

Hello.Array below const data = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]];I want to change it to the object below.const data = [ { a: 1, b: 2, c: 3, d: 4 }, { a: 5, b: 6, c: 7, d: 8 }, { a: 9, b: 1...

2 years ago
« - 16 - »

© 2024 OneMinuteCode. All rights reserved.