C Programming Tutorial – 17 – Making Decisions Using if Statements

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


The Weighted Tooth says:

did u just say “chalo” at 6:37 ?

Waleed Ahsan Sarfraz says:


int main()
char User_Name ;
char Pass_Word ;

printf(“This is a Login Form only for Waleedn”);
printf(“User Namen”);
scanf(” %s”, &User_Name);
if(User_Name == ‘Waleed’)
printf(“User Name is Correctn”);
printf(“User Name is Incorrectn”);
scanf(” %s”, &Pass_Word);
if(Pass_Word == ‘Ahsan’){
printf(“Password is Correctn”);
printf(“Password is Incorrectn”);
return 0;

I don’t know why this code is not working, like its not giving the correct output. Need help

Djamel Arab says:

the best ever !!

deniz alan says:

printf( ” What is your namen”);
scanf( “My name is %s”, NAME);

I want to write this and use “if Statement” for a specific sentence come out, when I write a specific name. Like when I write “Abraham” for “%s” I want to “if Statement” see it and put out a specific sentence only for Abraham but I couldn’t do it. Can anybody help me.

Bogdan Astefanesei says:

You are a god for me, i watch your tutorials 4 learning c and i learned very much in a short time.
You explain very well, u are a guru of c.Mate, how i make to work with numbers only?
My program, when i type askjdakjda he print to me “welcome”

Sabre Mase says:

Just watching you develop/write what you’re explaining is more beneficial than any C book could ever be.

Jason Heard says:


Tasneem P says:

its far too tiny gosh

Aseer Hassan says:

amateur alert!
say someone wants to save a program he makes like the program you made in this vid, how can one acheive that? like we just open that save file anytime we want and don’t need to make the whole code again?

viktor franko says:

very good tutorials and perfectly clear explained, also great examples,,, thank you

Nico Robin says:

Why doesn’t this work?

char gender[7];

printf(“Male or Female?n”);
scanf(“%s”, gender);

if(gender == “Male”){
printf(“Welcome sir!”);

if(gender == “Female”){
printf(“Welcome madame!”);

Peter Ren says:

you mean pornhub;)

Nada Sliem says:

same as javascript

►►► FireBoy2708 ◄◄◄ says:

you are good but slow i always watch 1.5 lol

Maxwell vil says:

duude. thank you for making my c programming lessons easy!!!!!!!

gett recht says:

“What website would the user need to be above 18 to enter? I don’t know, can’t think of any one.” KILLED me.

Dibyendu Db says:

post your real face.I wanna see your face.

Lester Cute says:

How can I use a char command in this “if statement”? i dont get it because he only exampled an integer not a word. help plss

Kutay Çalışkan says:

even though I enter a false statement it still shows up on the screen why?


int main()

if(4 > 10); {


if(10 > 4); {

return 0 ;

Wesley Richardson says:

hey bucky do u wanna netflix and chill?

Henrik says:

What has he done that the brackets are arranged like this? Haven’t found anything at google and it’s the only thing, that fucks me up about codeblocks. Maybe I’m just dumb…

Macro Music says:

I always get “Filename” has stopped working whenever i run and use an if statement code in my project

ethan Millan says:

hey bucky your videos are really good and helped out a lot, i’m doing a course on c but the marital is vague wondering if you can help

TheDeldax says:

Hey! is there any code that makes different lines with different color? easyone like textcolor in pascal?

jjb2723 says:

“Easy Capslock!” lol

abu sultan says:

thank you very much

Florian Hoppe says:

He guys, i tried doing some kind of a quiz with that Decision Statements but it didnt work, can someone tell me how to fix that ?

The code:


int main()

char answer [5] ;

printf(“Do you like bagles? Y/N n”);
scanf( “%s”, &answer) ;

printf(“You are awesome”) ;

return 0;

MooTheCow says:

or just type

printf(“nothing to see here”);

Nemanja Rackovic says:

Program za skidanje pornica 😀

Algirdas Jarosas says:

Eeasy to understand ! Thanks a lot!

khalid mreish says:

after this tutorials do i will can wight codes or understand reading codes?

IndiCoder says:

I also can’t thunk of any such website. :p

gabby lopez says:

Guys i have a question so i made a program that ask questions using Scanf now so for example i made someone answer the questions how do i know there answers the results shoudnt be there like a file that shows me that someone opened my program and answerd cake please help

Leverquin says:

does *= can be changed with += or -= /= if we have like int money;
money +=1; // money = money+1;

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 HatsFooding▷ 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▷ VapesHigh 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