Тёмный

C 2D arrays ⬜ 

Bro Code
Подписаться 1,9 млн
Просмотров 66 тыс.
50% 1

C 2D arrays multidimensional arrays tutorial example explained
#C #2D #arrays

Наука

Опубликовано:

 

2 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@BroCodez
@BroCodez 2 года назад
#include int main() { // 2D array = an array, where each element is an entire array // useful if you need a matrix, grid, or table of data /* int numbers[2][3] = { {1, 2, 3}, {4, 5, 6} }; */ int numbers[2][3]; int rows = sizeof(numbers)/sizeof(numbers[0]); int columns = sizeof(numbers[0])/sizeof(numbers[0][0]); printf("rows: %d ", rows); printf("columns: %d ", columns); numbers[0][0] = 1; numbers[0][1] = 2; numbers[0][2] = 3; numbers[1][0] = 4; numbers[1][1] = 5; numbers[1][2] = 6; for(int i = 0; i < rows; i++) { for(int j = 0; j < columns; j++) { printf("%d ", numbers[i][j]); } printf(" "); } return 0; }
@provokator-provocateur7603
@provokator-provocateur7603 2 года назад
This is better than Netflix. Im waiting every new episode.
@doochow9962
@doochow9962 10 месяцев назад
This was so helpful! I am an IT student and was having trouble understanding 2D arrays. This is the best video I found .
@user-bh8xz4xy7o
@user-bh8xz4xy7o 2 года назад
Helllo, I'm a student from Russia and I'm learning computer sciense, I want to say you help me so much and I hope your chanell will progress much more, good luck!
@itchybakerzz5101
@itchybakerzz5101 2 года назад
hi, I'm hoping that you can also make a compilation of this C course, just like what you did in your java tutorial. btw, thank you for these amazing tutorials.
@republicofserbia
@republicofserbia Год назад
Thanks for helping me out. Greetings from Serbia
@diusepausm
@diusepausm 2 года назад
This is one of best language learning channel tutorial i know
@JafarAlQudah
@JafarAlQudah Год назад
fery good fideo vro keep it in the up
@celestialcamel1959
@celestialcamel1959 2 года назад
Can you make a Django course soon? Thats what I'm really waiting for!
@na0miiii__
@na0miiii__ 2 года назад
good vid!
@stanleywambani860
@stanleywambani860 5 месяцев назад
What my lecturer does in 2 hours you do it in 5minutes😂
@yigitdogan2k
@yigitdogan2k 4 месяца назад
hi, can we use: # include # define rows # define columns and then use these defined sizes in our array and loop?
@umachandeeswari2942
@umachandeeswari2942 2 года назад
Great!
@tescenmo_Ed
@tescenmo_Ed 2 года назад
Thank you ❤
@umutaydn6184
@umutaydn6184 Год назад
thanks for the video
@joeface448
@joeface448 Месяц назад
It took all the way up until I saw "print" to realize this wasn't C++. T_T
@andrejpoljakovic5482
@andrejpoljakovic5482 2 года назад
Hi! Great video! I have a question. How does the code change from this if I need for a user to input the size of rows and columns,and not be given like in this video? Any help would be great,tnx! :)
@farisraid7588
@farisraid7588 Год назад
#include int main() { int rows, columns; printf("Enter the number of rows: "); scanf("%d", &rows); printf("Enter the number of columns: "); scanf("%d", &columns); int numbers[rows][columns]; for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { printf("Enter the value for element [%d][%d]: ", i, j); scanf("%d", &numbers[i][j]); } } printf(" "); for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { printf("%d ", numbers[i][j]); } printf(" "); } return 0; } In this example, we first declare the rows and columns variables, and then use scanf() to read in the values from the user. We then declare the numbers array using the values of rows and columns. Next, we use two nested loops to iterate over each element of the array and prompt the user to enter the value for that element using scanf(). Finally, we print out the entire array using two nested loops and the printf() function.
@GigaChad-zx9hj
@GigaChad-zx9hj 11 месяцев назад
@@farisraid7588 Thanks mate
@javenlim5514
@javenlim5514 Месяц назад
why does my code not run unless i add in the printf("rows: %d ", rows); printf("columns: %d ", columns);
@sachinsaagar7531
@sachinsaagar7531 2 года назад
Can u plz do the same for Android
@SHADOW-du7yf
@SHADOW-du7yf 2 года назад
Can you create a tutorial on how to create a website. Like what program to use and what languages you need to know .Would be a great video
@magns2623
@magns2623 2 года назад
Is there is any videos about data science ???
@luci1368
@luci1368 2 года назад
Bro the index of 2D arrays don't start at 0?
@javacoder2134
@javacoder2134 2 года назад
pls some java tuts?
@rendezvousonmemorylane
@rendezvousonmemorylane 2 года назад
It would be better if u spaced these out over a few days instead of uploading them all at once.
@Dovahkiin978
@Dovahkiin978 Год назад
?
@ADAM_SGS
@ADAM_SGS 2 года назад
Please put Arabic subtitles in RU-vid settings in your videos
@Baka-mx4yc
@Baka-mx4yc Год назад
Allahuuu aknarrrr
@civicaverage7963
@civicaverage7963 7 месяцев назад
It wont print, and i dont know if its the shitty online compiler im using.
Далее
C array of strings🧵
2:54
Просмотров 69 тыс.
SITUATION IN FAST FOOD
00:19
Просмотров 3,5 млн
Khabib came to check on Poirier 👀 #UFC302
00:25
Просмотров 586 тыс.
C pointers explained👉
8:04
Просмотров 139 тыс.
Java 2D arrays 🚚
8:06
Просмотров 156 тыс.
C++ arrays (#19) 🚗
21:09
Просмотров 18 тыс.
2D Array Basics | C Programming Tutorial
14:10
Просмотров 24 тыс.
Unlocking your CPU cores in Python (multiprocessing)
12:16
C arrays 🗃️
4:33
Просмотров 106 тыс.
Bardak ile Projektör Nasıl Yapılır?
0:19
Просмотров 3,4 млн
Крохотный и быстрый SSD на 2 ТБ
0:59
КАК GOOGLE УКРАЛ ANDROID?
17:44
Просмотров 60 тыс.