C Programming Tutorial – 11 – Getting Input with scanf

Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts


Crazy boy says:

printf(” Wondered how in the heck did he got 1.8+ million subscribers”);
printf(“Now I found out why”);
/*This is just a comment*/

Crius . D . Luffy says:

I try this, when i success key in number of babies program crash, why?
i try char crush;

char firstName[20];
char crush;
int numberOfBabies;

printf(“What is your name? n”);
scanf(“%s”, firstName);

printf(“Who are you going to marry? n”);
scanf(“%s”, &crush);

printf(“How many kids will you have? n”);
scanf(“%d”, &numberOfBabies);

printf(“%s and %s is in love, they have %d babies.”, firstName, crush, numberOfBabies);
return 0;

Shuhaibv Jamal says:

Bucky = Awesome

Louis Dexter says:

@thenewboston Mr. Bucky sir, I just love your tutorials on C, C++ and C#. It’s very easy to understand and memorize.
But I have a few doubts(not much). So could you provide me any means of contacting you?
I’ll delighted if you can provide me so. :)

DirectX says:

Wtf am i the only one with the last scanf not waiting for input? I wrote exactly the same code!

Krait Haywire says:

I love this dude so much! Haha!

Jokes apart, thank you sir. These have been really helpful!

Shut da hell up says:

really love these videos bucky

Ahtemarul Hasan Rokon says:

so reachel is the 21 years old hottie? :O

Saeed Alavi says:

When I want to enter characters as input I cannot type normal characters and my keyboard type weird characters!! I tried to change encoding to UTF8 but again it did not fixed. I also checked several encoding but none of them worked. I have this problem just for letters and numbers can print correctly.

Pranav Bhatia says:

I’ll pray to god that Rachel loves you back.

Coal says:

03:04 “The crush…array.That sounds like i wanna smash”
Well,that’s not wrong.

ThePedro1233 says:

What if you do not want to include what you write into scanf in your output?

Puzzle Tuber says:

Bucky,greaat videos thanks..
but, my laptop have problem compiling this kind of data..

same codes i typed as u did
then,my name
it is showing “process returened 255 “. what to do??

mmysticmann says:

53 babies. or more probably more. I respect you too much Bucky. lol

Jearl Price says:

When would you want to use scanf instead of cin?

Nayeef Ahsan says:

This guy is a genius. Thanks you so much.

crist2000a says:

did not get it.

char input[3];

enter 10 chars and all of them will be printed out, regardless size of input is limited to 3.

Zou Shunzhou says:

Everything Bucky loves starts with Mc-

XP :D says:

You talk too slow so I speed up video.

Tijs Van Cauwenberge says:

can someone tell me what’s wrong with this code:


int main()
char firstname[20];
char lastname[20];
int age;

printf(“What is your first name?”);
scanf(“%s”, firstname);

prinf(“what is your last name?”);
scanf(“%s”, lastname);

printf(“How old are you?”);
scanf(“%d”, &age);

printf(“%s %s is %d years old.”, firstname, lastname, age);

return 0;

clash of clans georgian fans says:

why did u use & in scanf and why u did not use it after that in printf? or it is just because that numberofbabie was in scanf and in printf? 😀 think u know what i am asking

Cewyah says:

Your videos are so inappropriate but, they sure get those programming languages and/or markup languages stuck in your head pretty well. Love them. :)

Sam Shek says:

best teacher ever 😀

Ezen Gondolkozom says:

%d as integer (ㆆ_ㆆ)

Taiquan Liu says:

Man your video is soooooooo funny.

sanidhya chugh says:

honestly speaking bucky , you are the best teacher in my life till yet i must say . i am a student from india who is presently doing a course of bachelor in computer appliations :) . you are the best 😉

Arijit das sharma says:

i hv just 1 question why the number of babies is not taken in array and taken a s variable .can someone please explain

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles   Show Cars   Motorbikes   Scooters   Bicycles   Rims & Tires   Luxury BoatsFashion   Sunglasses   Luxury Watches   Luxury Purses   Jeans Wear   High Heels   Kinis Swimwear   Perfumes   Jewellery   Cosmetics   Shaving Helpers   Fashion Hats   Modeling TipsFooding   Chef Club   Fooding Helpers   Coktails & LiquorsSports   Sport Shoes   Fitness & Detox   Golf Gear   Racquets   Hiking & Trek Gear   Diving Equipment   Ski Gear   Snowboards   Surf Boards   Rollers & SkatesEntertainment   DIY Guides   Zik Instruments   Published Books   Music Albums   Cine Movies   Trading Helpers   Make Money   Fishing Equipment   Paintball Supplies   Trading Card Games   Telescopes   Knives   Vapes   GameplaysHigh Tech   Flat Screens   Tech Devices   Camera Lenses   Audio HiFi   Printers   USB Devices   PC Hardware   Network Gear   Cloud Servers   Software Helpers   Programmer Helpers   Mobile Apps   Hearing AidsHome   Home Furniture   Home Appliances   Tools Workshop   Beddings   Floor Layings   Barbecues   Aquarium Gear   Safe Boxes   Office Supplies   Security Locks   Cleaning ProductsKids   Baby Strollers   Child Car Seats   Remote ControlledTravel   Luggages & Bags   Airlines Seats   Hotel Rooms   Fun Trips   Cruise Ships   Mexico Tours