C Video Tutorial 2

Get the Code Here : http://goo.gl/gyLN0

Welcome to part 2 of my C Video Tutorial. If you missed part 1 check it out first.

In this part of my C Tutorial I will cover: Compiling Options, Relational Operators, Logical operators, If, Else, Else If, Conditional Operator, Sizeof(), Bytes, Bits, While, Do While, For, Break, Continue and more…


Tilion Dece says:

“I bought one products”…

Ian Skinner says:

My terminal doesn’t like and “&&” or or “||” together for some reason, it comes up with this warning message: place parentheses around the ‘&&’ expression to silence this warning. But when you execute it turns out perfectly fine. Any thoughts?

Alberto Micker says:

I’m embarrassed…. I don’t get it… I don’t understand at minute 23, I ran the code but, how come if I put 3 then the top value is 7, then 8 the top value 255  could someone explain it please. i got a headache.

z4961 says:

Thank you so much

Tech Zombie says:


Alex Lord says:

Am I understanding this right? For the ‘myMultiplier *= 2’ line of code – it means ‘myMultiplier = myMultiplier times by 2′? So the myMulitplier variable essentially just times itself by 2 during each loop?
If my question makes sense? :’) Thanks in advance to anyone who can help me out!

Voignar says:

Awesome tutorials! Derek you should make game development tutorials with C using SDL.

Jonathon Davis says:

Wait i don’t understand most of how to do this should I like search it up or take a programming class im 15?

Offline says:

but… how can it return a string when main is a void ? doesn’t void mean that it doesn’t return anything ? or it just means that it doesn’t have to returns anything but it can ?

Dhruv Jethva says:

I din’t understand the difference between “break” and “continue”

pls help

Johannes P. says:

I see you with that lowkey Dynamic Programming approach

Jesper Carlson says:

My compiler/IDE says “‘::main’ must return ‘int’ “. Why can’t I use void?

Eesha U says:

how can I download a command line?

Dhruv Jethva says:

Anyway , awsome toturial

Thank u

sri chakra says:

int main(void){
int x,y;
printf(“enter the value of x :”);
y = 1;
}else if(x == 0){
y = 0;
}else if(x <1){
y = -1;

Uzias Lara says:

I like the way you explain different concepts so much that I keep coming back for more!  Thanks for your dedication.

misztsz says:

Just noticed some differences between the code in the video and the code placed at Your site. Lines 135 to 143 are missing in the video. Should I expect more code placed in Your site?

Jeff Merlin says:

Great tutorials, Derek. I’m a fan.

However… I was a bit surprised when you constructed the logic for Bob and his raise. I’ve been a software developer since early 80s, and I have never “trusted” the operator precedence when it comes to and/or operations. Well, that is: I have never trusted my memory. You’re right of course, but I believe it’s not that easy to see that “false and false or true” is “true” and “false and (false or true)” is “false”… Anyway, it might me being old and grumpy. :-)

Hugh Bowman says:

Derek, I appreciate your videos! I’ve done the Java and Algorithms in Java videos.

In this video, around the 13:00 I kept encountering a problem.

Your example:
printf(“A char takes up %d bytes/n/n”, sizeof(char));

all produced an error message for me. said it expected “long unsigned int”

I changed all my %d to %ld and it worked.

I’m wondering what caused the difference (because it ran fine with %d for you).

Difference in compilers or version?


sri chakra says:

if i am entering 10 the output should be one but it is giving 0

swarnadipmitra says:

You need to explain, I believe, how loops work to newcomers, before getting into implementing algorithms with loops. I could follow along because I’m well familiar with C, but I’m not so sure about people who are just learning C. But other than that, I feel like the rest of the video is quite impressive, as in, no matter how rushed the video is they will be able to pick up what you are saying. Also, I really like the fact that you take your time out to reply to comments. That’s really commendable!

Alberto Micker says:

I did the different bytes exercise but “long int” returns 4 bytes, I’m just wondering why.

Houwen Lie says:

what does while(1) means?
isn’t it supposed to be while(condition) ?

Michelle Munteanu says:

Your videos are the best!

iclou dthemes says:

I learned C in 2 days because of you and some C++ but my background in python is what helps me understand this so easily.
Keep up the amazing work but i have a request make a NASM tutorial.

Eesha U says:

how do i use command line.. please help

Ani V says:

very good

Karolis Liucveikis says:

How come in the part 1 you said that int (not long int) may hold up to 32767 and in this part it takes up 2.147kkk?


Sir Will you do some tutorial on Competitive Programming too?
It will help us a lot :)

Gaarsin says:

That ‘otherwise until next time’ sounded like Quinn from Into the Badlands or maybe I’m hearing things.

Rubik's Cubed says:

is there any difference between using a while true with a break and using a do while loop?

HarmlessBison0 says:

One disliker 😛

85Damix says:


int x = 0;

void main(){

while(x < 5){ x++; printf(“d%”, x); } } why does it returns ddddd instead of 1234?

Michael Ts says:

great video but your definitely better with computers THAN grammar haha

Mez Cop says:

If you have 0 bits; you’re not making any range of numbers. It’s not zero… it’s nothing. Zero is not the same as nothing.

Nick Odnosumov says:

kind of personal q, but: is that what you do for life (coding lesson videos) or is there some cool (not necessarily) project you’re working on?

Jayanthi Manogaran says:

thank you :)

biff biffson says:

I still get “main must return ‘int'” when using std=c99 and a void main(){}. Any ideas? Also, I see in a lot of your videos you use the keyboard (I believe) to select a line of text. Care to share that secret? I’ve searched for it before to no avail.

Thanks for your awesome videos!

Mohamed Ebn Galal says:

Great video!
and thank you for your efforts.
but when you did the do while example, what makes the program stop?
there are three sizes and I think it won’t be stoppable except after interning one of the three sizes, or what is the true thing teacher.

Alberto Micker says:

Hello +Derek Banas I just wanted to thank you for this excellent tutorial. I wanted to learn programming since 1998 but once I get a task to do I get too confused. I’m gonna try again.

Ayush Khanna says:

why didnt u use scanf in this?

Flying Tiger says:

plz tell me a good book on Programming algorithms.

peter chacko says:

next do Android ndk

Embeh says:


Ely Eastman says:

Isn’t it the case that any do-while could just be written as a while anyway? Set size of shirt to an unacceptable option (say, ‘’), and have it run a regular while loop with the same condition?

Joseph Adams says:

How do you remember the syntax for so many languages?

fewdGuy says:

Do you ever work with void pointers in C? Or performing sorts on stuff you don’t know the type or size of?

Tech Zombie says:

Where can I get the version of GCC you’re using? Mine always expects a void or int after main.

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