Initialize An Array With User Input | C Programming Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

It was so easy and helpful. I was searching for the same problem and wasted an hour.finally, got it.

ahnafshahriarrafat
Автор

Hey quick question. what IDE are you using here?

malo
Автор

I'm a beginner. I started a program to list fruits and how much of each was eaten. I did it, but it was not elegant enough for me🤭. I wanted to have arrays for both fruits and numbers built from users input. I tried using my limited post-"Hello World" skills.🤔🤨 It was a nightmare. . . until I found THIS. THANK YOU!

savagepro
Автор

hey ! I tried using the user defined length. Even though I initialized the length, my compiler kept giving me an error of "expression must have a constant value" at where you have "int array[length]; ". Even if I assign my length to something that error still comes up.

the_ehiane
Автор

Could you please make video how to take user inpuf from one line and split it and store it in int array

The input will be like this
1 2 3 4 5

Int array[]
Array[0]=1

shahdmohammed
Автор

Great video! I would like to ask if there is a difference by using array in that kind of example you've shown. Let's say that we changed "array[%d]. 5+5=" to "%d. 1+1". and just simply removed the array and just let it be length. Is there a difference? Based on what I see the array[%d] only just serves as a numbering. So is it possible to run the program without using array?

Chomiii
Автор

Thanks for the amazing video! Why can't an entire character array be initialized at once using a variable length -

int x = 100;
char string[x] = "Portfolio";

This causes an error but something like

int x = 100;
char string[x];

string[0] = 'P' ; doesn't cause an error. Could you explain the difference?

ValliNayagamChokkalingam
Автор

Hi, this might seem like an obsolete thing to ask but, I am using the Mingw compiler and I cant seem to enter user input, this is my first time using this compiler. Is there a way to show the strings for my user inputs, the "Length: " printf because all it shows me is that my program is running ??

Prodigyredd
Автор

When I try to set the array length to a variable that is set by the user, it tells me that array size mu be a constant value.

WojtekDwanascieLat
Автор

idk why, but my program only read the last array to print? was i get wrong?

karaf
Автор

How do you fill an array with output results each time the user runs the program and then subsequently display all the results after each run up to five runs. For example, on the first run, the user will enter a number and then it gets print to the screen, and then on the second run the results will display the first and second number. Thanks!

evanstein
Автор

Thank you, I have been looking for help on this. Much appreciate your videos!

siosinv
Автор

how to read and store 10 numbers each of which is between 10 to 100?

Sudharaka_Ashen_Edussuriya
Автор

Is there a way to allow the user to insert the array length but allow them to enter number of elements that is less than or equal to the length. For example: if a user makes the array size 5 and is still able to enter up to five numbers in the array

hannahchez
Автор

Great video yet again. Thank you for making these

ketamathics
Автор

Awesome video, if possible, can you make a video the uses fscanf/fprintf functions in combination with Pointers and arrays? You explain it better than most professors I have had.

hondaromio
Автор

Hi, thanks for the vids! Very helpful! May I know what IDE are you using?

youtubeuser
Автор

whatever anything I do or did or anything thanks

ryanalnaser
Автор

Hello, can you please make a video about array that ask numeric input from user then categorized the entered data without using if else or switch? I love how you explained things very informative and clear.

hitler