array tag

224 questions


1 answers
118 views
0
When you dynamically assign a C language array...

#include <stdio.h>int main(){ int * arr1 = (int *)malloc(sizeof(int) * 6); int * arr2 = (int *)malloc(sizeof(int) * 6); int * arr3 = (int *)malloc(sizeof(int) * 6); arr1[3][2] = { {3, 4}, {5, ...


1 answers
44 views
0
c Declare an array of sizes specified by the language variable

int i;scanf(%d, &i);int aa[i];I think I saw the code to declare the arrangementWhy do I get an error?

2 years ago

1 answers
121 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

1 answers
50 views
0
To output the C-language strings in reverse order

#include <stdio.h> // output in reverse string orderint main() { char sarr[] = banana; for (int i = 0; i < 10; i++) { if (sarr[i] == '\0') break; sarr[i] = sarr[5 - i]; printf(%c\n, sarr[...

2 years ago
« - 23 -

© 2024 OneMinuteCode. All rights reserved.