array tag

224 questions


1 answers
47 views
0
C language: Implementing a function that verifies that a given array contains a given number

#define _crt_secure_no_warnings#define size 5#include<stdio.h>void GetIntArray(int* v, int n);int Isinclude(int* v, int n, int val);int main(){ int v[size]; int n = 5; int val; printf(Enter val:...

2 years ago

1 answers
57 views
0
c++ char type output

I got 123456 inputI'm trying to print out 321654 What's wrong with my form??int main() { int t = 0; char str1[4]; char str2[4]; cin >> str1 >> str2; char str1copy[4] = { 0 }; char str2copy...

2 years ago

1 answers
136 views
0
Python [::] What do you call this?

If you use a string or array in Python, a = '123456789'print(a[::])#Output: 123456789There are times when [::] calls are used as above. What do you call this function?

2 years ago

1 answers
94 views
0
C Unusual result values for rows/columns in a rudimentary two-dimensional array

After making a two-dimensional array using random numbers,A program that outputs an array in a two-dimensional table after obtaining the sum of each row and each column.But if you compare the table wi...

2 years ago

1 answers
58 views
0
the beetle problem

#include <stdio.h>#include <time.h>#define ROWS 20#define COLS 20int main(void){ srand((unsigned)time(NULL)); char dot[ROWS][COLS]; for (int i = 0; i < ROWS; i++) { for (int j = 0; j &...

2 years ago

1 answers
41 views
0
This is a C language array problem. Outputs the closest number to the number entered in the array

It takes an integer from the array and outputs the element and difference of the most approximate value.The desired terminal output is as follows.[ 10 20 30 40 50 60 70 80 90 ]Enter an integer: 23The ...

2 years ago

1 answers
67 views
0
Initialize to 2D array element 0.0C language

When you declare a two-dimensional array dynamic assignment and enter the number of rows and columns, you want all the elements in the array to be initialized to 0.0, but I'm not sure what's wrong. vo...


1 answers
52 views
0
c Language dynamic assignment array deduplication question.

#include <stdio.h>#include <stdlib.h>int main(){ int cnt, i, j; printf (How many numbers do you want to enter? : ); scanf_s(%d, &cnt); int* arr = (int*)malloc(sizeof(int)*cnt); int* ar...

2 years ago

1 answers
135 views
0
Error in Java, Array, Break statement

int s[] = {0,10,20,30,40,50,60,70,80,90,100}; int number, index = -1; int i; Scanner scan = new Scanner(System.in); System.out.println (Enter a value to explore).:); number = scan.nextInt(); fo...

2 years ago

1 answers
102 views
0
Array - push is not a function (javascript)

var name = ['a', 'b', 'c']; name.push('d'); There was an error doing this.name.push is not a functionHowever, there was no problem because the variable name was changed from name to a as follows. var ...

2 years ago
« - 22 - »

© 2024 OneMinuteCode. All rights reserved.