#4: Get User Input in C Programming

  Рет қаралды 214,494

Programiz

Programiz

Күн бұрын

#4: Get User Input in C Programming
Step by step video tutorials to learn C Programming for absolute beginners!
In this video, we will learn to take input from users using the scanf() function and show output using the printf() function. In C programming, the scanf() function takes input from the user and stores it in a variable. Similar to printf(), the concept of format specifier is also used in scanf() so, we will learn it in much detail.
~
Run C Online: www.programiz.com/c-programmi...
Programs in this video:github.com/programiz/c-youtub...
C Data Types (text-based tutorial): www.programiz.com/c-programmi...
Watch our videos and revise them with our C App!
Download here for Android: bit.ly/3upaInx
Download here for iOS: apple.co/3EZLtNq
Timestamps:
0:00 Start
3:09 Take Double Input
5:30 Take multiple input
6:56 Quiz
Find Programiz elsewhere:
Facebook: / programiz
Instagram: / _programiz
LinkedIn: / programiz
Twitter: / programiz
Website: www.programiz.com
#cprogramming #programiz #learnprogramming #takeinputinc #programming #scanf #printf #input #output

Пікірлер: 375
@programizstudios
@programizstudios 2 жыл бұрын
🔥Finding it Damn Hard to Understand C Programming? Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT! Try Programiz PRO for Free: bit.ly/master-c-programming
@prasadjonnala9509
@prasadjonnala9509 Жыл бұрын
OPTION C
@cloudproblemssolved
@cloudproblemssolved 5 ай бұрын
for printf, %f and %lf are both used for double, but this is a scanf function, so only %lf is used for doublem %f is for float, therefore I agree with the other comment, option c
@fulchandsheikh4380
@fulchandsheikh4380 2 жыл бұрын
the answer is option c. scanf("%lf", &input);
@collinshagembe7852
@collinshagembe7852 Жыл бұрын
Just started learning programming for the first time and so far, so good. About the last quiz on the tutorial, double input is represented by %lf, hence the correct answer is ("%lf", &input);
@sukanyamukherjee5475
@sukanyamukherjee5475 2 жыл бұрын
Answer to the question asked in the end of the video will be option C.
@sezarefretamiguel3249
@sezarefretamiguel3249 Жыл бұрын
I agree 100%d
@LyricsVibe95
@LyricsVibe95 10 ай бұрын
But it is double input, the format specifier for double is %lf, so why do you go to %f? That's format specifier for float.
@cloudproblemssolved
@cloudproblemssolved 5 ай бұрын
@@LyricsVibe95 In scanf and related functions, %f is used for float and %lf is used for double
@anommaharjan3005
@anommaharjan3005 2 жыл бұрын
Programiz has been my go to channel for learning C programming. You guys never fail to give amazing tutorials. Thank you team programiz!!! Very grateful 👍👍😄😄
@mahi8862
@mahi8862 Жыл бұрын
What are you doing now
@justind4615
@justind4615 Жыл бұрын
@@mahi8862 he's hacking most popular banks games, govrement etc
@kmaboreke0
@kmaboreke0 Жыл бұрын
These lessons are excellent for beginners. Keep up the good work!
@mabuocmanyuat7117
@mabuocmanyuat7117 Жыл бұрын
the course is simplified and the face facilitating is encouraging to watch all the series at once lol
@Nathan00at78Uuiu
@Nathan00at78Uuiu Жыл бұрын
Nice studio setup! Very professional looking and awesome content. to the point and informative.
@eazyj_c
@eazyj_c 9 ай бұрын
Great tutorial. The correct way to take a double input is of answer C: scanf("%lf", &input); Thanks.
@hm...4517
@hm...4517 2 жыл бұрын
Its been a while I've been subscribed to this channel and my skills as a C developer has grown rapidly. Thank you for this series !!!
@stevensmasenya80
@stevensmasenya80 Жыл бұрын
I'm enjoying these lessons so easy to understand
@georgiaisiodu1742
@georgiaisiodu1742 6 ай бұрын
Thank you so much for the simplicity of your lessons
@nyamburageorgemboni2090
@nyamburageorgemboni2090 Жыл бұрын
I enjoy your lessons very much and are very helpful 👍👍👍❤❤
@hrushabhpatil9446
@hrushabhpatil9446 2 жыл бұрын
Thank you so much for the video @Programiz
@davidemmanson001
@davidemmanson001 Жыл бұрын
@Programiz is my best experience with C
@daveterra4778
@daveterra4778 Жыл бұрын
Thank you , this is great! more please.
@alirezaz9896
@alirezaz9896 Жыл бұрын
the best tutorial i have found about c language👌
@tinku4568
@tinku4568 2 жыл бұрын
Keep doing all languages in same way.. thanks a lot madam 😍🥰🥰
@harikrishnansa7206
@harikrishnansa7206 2 жыл бұрын
Good. Waiting for the next session. 😇
@chad5520
@chad5520 Жыл бұрын
Thank you this was useful for beginner!
@brito809
@brito809 Жыл бұрын
quick and sweet. I like this tutorial a lot.
@keshusingh4538
@keshusingh4538 2 жыл бұрын
Very informative! 👍👍
@joechen9498
@joechen9498 28 күн бұрын
Thank you for the content. it's very interesting and helpful. enjoy it very much.
@harikrishnansa7206
@harikrishnansa7206 2 жыл бұрын
/* Program to take integer and float input from the user */ #include int main() { int value1; float value2 ; printf(" Enter the values : "); scanf("%d" "%f",&value1,&value2); printf(" The integer value entered is : " "%d",value1); printf(" The float value entered is : " "%f",value2); return 0; }
@manojkumarsahoo7094
@manojkumarsahoo7094 2 жыл бұрын
👍
@mr.sowhat3796
@mr.sowhat3796 Жыл бұрын
thanks this helped alot! I said %lf instead of %f thank you so much!
@madhusmitamahapatra5181
@madhusmitamahapatra5181 Жыл бұрын
Why u both use %d & % f ?
@mr.sowhat3796
@mr.sowhat3796 Жыл бұрын
@@madhusmitamahapatra5181 im sorry were you talking to me?
@creative_command
@creative_command Жыл бұрын
@@madhusmitamahapatra5181 %d for int value and %f for float value
@kaurjasneet1379
@kaurjasneet1379 Жыл бұрын
i am loving this journey of learning so informative videos:)
@agneskanze2719
@agneskanze2719 8 ай бұрын
Very well simplified its easy to understand
@annettewairimu5542
@annettewairimu5542 3 ай бұрын
option C is the correct answer. option A is for the int data type input, option B is for the float data type input, and option D is for the char data type input. Great content, amazing explanation.
@muhammadabouzaid8714
@muhammadabouzaid8714 Жыл бұрын
As usual, awesome and great.
@HarpreetSingh-jd3tu
@HarpreetSingh-jd3tu Жыл бұрын
liking this course, thanks
@rptalks.9868
@rptalks.9868 2 жыл бұрын
Expecting more and more content/vedios from you............
@abolarinjohn9417
@abolarinjohn9417 Жыл бұрын
#include int main(){ int number; float decimal; printf("Enter an integer and float number with spaces: "); scanf("%d %f", &number, &decimal); printf(" Your integer = %d", integer); printf(" Your decimal = %f, decimal); return0; }
@saadtalemsi5906
@saadtalemsi5906 9 ай бұрын
You re wrong bro, it should be: #include int main() { int number; float decimal; printf("Enter an integer and float number with spaces: "); scanf("%d %f", &number, &decimal); printf(" Your integer = %d", number); printf(" Your decimal = %.2f", decimal); return 0; }
@ymsd
@ymsd 8 ай бұрын
@@saadtalemsi5906 i think in one year he'd understand by now💀
@aachalgupta2986
@aachalgupta2986 2 жыл бұрын
great easy to understand
@ChickennoRotMG
@ChickennoRotMG 2 ай бұрын
Thank you!
@SimplicityND
@SimplicityND Жыл бұрын
It's been awesome 😎 so far.. thanks programming crue
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
Thank you so much!
@leenhallal4387
@leenhallal4387 Жыл бұрын
thank you for such beneficial content
@user-ci9xt8ky2s
@user-ci9xt8ky2s Жыл бұрын
very clear and nice tutorial thank you🤗🤗🤗🤗
@tinku4568
@tinku4568 2 жыл бұрын
Ur just amazing madam.. very useful to us😍
@kristinajoshi3995
@kristinajoshi3995 2 жыл бұрын
really explained well.
@shankaryarramneedi6958
@shankaryarramneedi6958 2 жыл бұрын
Your explanation was to good mam 👍
@menaujiri
@menaujiri 8 ай бұрын
Very simplified course seen so far.
@alexandreramalho9637
@alexandreramalho9637 4 ай бұрын
great one! as always!
@khemtiwari9469
@khemtiwari9469 2 жыл бұрын
Finally waiting is over 👍👍👍
@Lamya_1
@Lamya_1 2 жыл бұрын
Thanks
@zoranstevanovic918
@zoranstevanovic918 2 жыл бұрын
Great 👍
@seabasschukwu6988
@seabasschukwu6988 Жыл бұрын
in love with your content!!
@Shanks047
@Shanks047 9 ай бұрын
as a first year student c programming looks so cool....don't know how long will this feeling will go on.................
@princemensah8473
@princemensah8473 5 ай бұрын
Really Helpful
@emekailonwa8963
@emekailonwa8963 Жыл бұрын
Thanks for the video
@seabasschukwu6988
@seabasschukwu6988 Жыл бұрын
thank you so much!!
@actionmovies3675
@actionmovies3675 Жыл бұрын
Thanks for your giving us a good guide contents. The answer of you question is option C. scanf("%lf", &input);
@gagangr6431
@gagangr6431 2 жыл бұрын
Super Explaintaion and good visual's
@bignaughtydog
@bignaughtydog Жыл бұрын
My solution to question at the end of this video. Thank you. //enters integer and float input from the user. Display responses how you wish. #include int main(){ int number; float number1; printf("please enter values here: "); scanf("%d %f", &number, &number1); printf("the values you entered here are %d and %.2f", number, number1); return 0; }
@adamkats2515
@adamkats2515 3 ай бұрын
Great Video
@countrysideshowyaigrock4689
@countrysideshowyaigrock4689 Жыл бұрын
It`s all awesome!!
@jangaiahchikkonda128
@jangaiahchikkonda128 2 жыл бұрын
Good explanation, and make more videos immediately and make it some lenghthy, as like before sessions.
@cabahugjethronathanieln.8650
@cabahugjethronathanieln.8650 2 жыл бұрын
Hello can u make a video that explains what are data types, what are variables, and others.
@joresatouotap7115
@joresatouotap7115 Жыл бұрын
I enjoy your course
@jasonsassine5997
@jasonsassine5997 Жыл бұрын
thank you you helped me alot in my school exam
@davidsulaberidze5978
@davidsulaberidze5978 2 жыл бұрын
Thank you
@user-iz2et4kj9y
@user-iz2et4kj9y Жыл бұрын
same as my university beginners course.👌
@sanchanadimalshaperera9421
@sanchanadimalshaperera9421 7 ай бұрын
Thank You
@abdiwahabbashiir4108
@abdiwahabbashiir4108 Жыл бұрын
awesome!!!!!
@ParkerPlaysPC
@ParkerPlaysPC Жыл бұрын
❤🎉 amazing video! 📷
@hkshksian4793
@hkshksian4793 2 жыл бұрын
Thank u Ma'am 😍
@aanuoluwabolajoko6800
@aanuoluwabolajoko6800 Жыл бұрын
c.😁. thanks to my good teacher!
@stellicpiano
@stellicpiano Жыл бұрын
very nice tutorial
@jacejeffrey4458
@jacejeffrey4458 Жыл бұрын
very good video
@nicomarathon748
@nicomarathon748 2 жыл бұрын
#include int main(void) { int quantity; float price; printf("Enter quantity and price of products: "); scanf("%d %f", &quantity, &price); printf("Quantity: %d, Price: %.2f ", quantity, price); } Multiple choice answer: C
@user-ld6iz3rd5d
@user-ld6iz3rd5d 4 ай бұрын
okay so i understand what you have explained so far and i decided to try it on my own, instead of double input and alphabet, i tried using name and age but i keep getting error though i used the same format
@boyd5395
@boyd5395 7 ай бұрын
tres bien
@amitube663
@amitube663 Жыл бұрын
the answer is C. thank you for your tutorial.
@kevinotieno9297
@kevinotieno9297 Жыл бұрын
Awesome
@MD.Bipul_islam
@MD.Bipul_islam 2 жыл бұрын
Best class apu
@gururaj676
@gururaj676 2 жыл бұрын
Very gratefu
@eyupkayatuzi4444
@eyupkayatuzi4444 2 жыл бұрын
awesome
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
great vıdeo as always
@iam__aj37
@iam__aj37 10 ай бұрын
WAP to take integer and foat input from the user. #include int main(){ int number1; float number2; printf("Enter the input values: "); scanf("%d %f", &number1, &number2); printf("IntNum= %d, FloatNum= %f",number1,number2); //printf(" FloatNum= %f",number2);// return 0; } Outpur: number1: 20 number2: 20.35
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
😍😍😍😍😍😍😍😍 perfect explanatıon
@user-bf8ex3kd7u
@user-bf8ex3kd7u 8 ай бұрын
%lf is the format specifier of double input data type.
@ramildondon6679
@ramildondon6679 Жыл бұрын
i like it when i have something to learn i love it i will able to continue watch u until my eyes inlove with u your so beatiful and awesome.
@emmydee408
@emmydee408 Жыл бұрын
The answer to the quiz is C.... Thank you ma 🙇🏾‍♂️
@LyricsVibe95
@LyricsVibe95 10 ай бұрын
I want you as my professor omgggg 🥺🥺
@salmanmugharbel
@salmanmugharbel 8 ай бұрын
good
@c_learner_on_linux
@c_learner_on_linux Жыл бұрын
How do i use the scanf function that will assign it's result for many value? For instance, input the result for name, age and gmail, then return the inpuutted values.
@PyKej
@PyKej 2 жыл бұрын
best ❤❤
@xulasho2022
@xulasho2022 Жыл бұрын
can anyone explain to me where this 22 comes , I confused.
@dharshan6868
@dharshan6868 Жыл бұрын
answer is c love your content 😀
@Jayashreee624
@Jayashreee624 Жыл бұрын
What was written in the scan f() after %d
@issabello.
@issabello. Жыл бұрын
The choice number C . is the correct way to take doublen input isn’t it ?
@naiduyt3350
@naiduyt3350 2 жыл бұрын
I have a doubt, when the user is giving the input as a character , is it not necessary to include single quote to the character? For Ex: scanf("%c, &'character');
@jerishkt9972
@jerishkt9972 Жыл бұрын
No
@ismartdurgesh4903
@ismartdurgesh4903 2 жыл бұрын
C is correct option
@lalbahadursharma1726
@lalbahadursharma1726 Жыл бұрын
C is the correct
@rdsrds3145
@rdsrds3145 2 жыл бұрын
My answer to the quiz is option c
@anime_and_cartoon_clothes
@anime_and_cartoon_clothes 2 ай бұрын
thumbs up
@florelouisstephano9948
@florelouisstephano9948 9 ай бұрын
Answer C is the correct way to take double input where the scanf function is being used to take the variable from the user "%lf" and the format specifier is lf and the line of code reads as follows: scanf("%lf", &input);
@ritikagoudabz
@ritikagoudabz 12 күн бұрын
it'll be option c right?
@anwin7229
@anwin7229 Ай бұрын
Can you help me i am using eclipse When i type the first program the two printf line in a same line in console just like enter input value age = 22 the out put is just like this can you help how to solve 2:41
@aboutouruniverse3834
@aboutouruniverse3834 Жыл бұрын
is it not possible to write a full word on char...? must it always have to be a letter...?
@devilzspace808
@devilzspace808 2 жыл бұрын
A and C both are correct
#5: Comments in C Programing |  C Programming for Beginners
7:59
#6: C Operators | C Programming for Beginners
11:54
Programiz
Рет қаралды 153 М.
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 18 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 14 МЛН
Be Careful When Using scanf() in C
12:22
NeuralNine
Рет қаралды 126 М.
Getting User Input | C | Tutorial 12
12:15
Giraffe Academy
Рет қаралды 42 М.
#3: Data Types in C Programming | C Programming for Beginners
10:12
C user input ⌨️
6:58
Bro Code
Рет қаралды 44 М.
Input and Output:  Printf and Scanf - C Programming Tutorial 06
17:19
#8: Boolean and Comparison Operators in C Programming
14:41
Programiz
Рет қаралды 109 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 808 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,1 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 18 МЛН