declare tag

2 questions


1 answers
250 views
0
Is there a reason why dynamic arrangement should not be declared like this?

The size of the array is determined at compile time, so to declare an array of dynamic sizes int size;scanf(%d, &size);int* arr = (int*)malloc(sizeof(int) * size); I was taught to do this, but eve...


1 answers
110 views
0
Can't I declare a function in main()?

There was no big problem when the function had 1 variable.However, there was a problem because there were many variables and many declarations.This program applies avg (where to store the mean) and st...

1 years ago

© 2024 OneMinuteCode. All rights reserved.