C Programming Tutorial - 46 - Problems with String Lengths

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

I better follow the programming laws. I don't want to go to jail.

bigmacdoubleyouv
Автор

4:37 am. Bucky - you're a real hardworking man!

RealMcDudu
Автор

you made this at 4 am ur freakin hooked man !! major respect i appreciate what u do ..

supersuleboy
Автор

You taught me C better than both my textbooks and professor.

irvingc
Автор

It's important to mention that fgets() also reads the new line character '\n', so if you want to have a string with 7 characters max, and you use fgets() and enter "Hello" then the length will be 6 and not 5 because it was read as "Hello\n". It's important to remember to get rid of that '\n' sign.

edwardkeselman
Автор

Im so glad i took assembly programming before c, it's helping me understand a lot of things from these tutorials.

RiveraShatz
Автор

Respect bro /\ you're amazing man. yiu made this at 4.34 AM wow no words for you !! may god give you healthy and rich life.

ajay
Автор

Why do you need the pointer variable, when movie itself can be used as a pointer?

char movie[4];
fgets(movie, 4, stdin);

samsnowball
Автор

I have just subed. Your tutorials are easy, fun, yet educative. This is how ppl should teach stuff. Well done.

psionicxxx
Автор

Bucky.
Thankyou so much for teaching us programming.
I will definately be watching these videos for a long time.
the plan is to first learn C, then C++, then C# then Java...
the rest is a bit fuzzy

chewelanthani
Автор

Oh my god, that’s why C is so dangerous

jexwtxk
Автор

why i am using puts instead pf printf?cant i use printf?

_rahulbhattacharya
Автор

Why do you guys want to learn this? I find it fascinating that so many people think this is fun. Im not hating on you people, I'm just curious. Please reply with what your drive or motivation is! 

kallesbaksatt
Автор

1:00 "You are gonna have a bad time." Reminded me of Sans eve if this video is older than Undertale. XD

eszmeraldajazminkovacs
Автор

Thanks man! you are really THE Man! and btw, some of your jokes are funny ;)
Good job in sum!

saras
Автор

Watching this video with jail wifi, regret that I didn't watch it sooner.

RakibHasan-pqdl
Автор

Any idea how to do this?
1. Write a program called operations.c that asks the user to type a command for two operations, sum and multiply and perform the following:
If the user types: sum 1 2 3 4 5
The program prints the value 15
If the user types: multiply 1 2 3 4 5
The program prints the value 120.
For both commands, the numbers are separated by spaces.
Hint: The function int atoi(char * str) of the standard C library (#include <stdlib.h>) converts a string to an integer if *str is a string that contains only integers.
Example of an interactive session:
Type command: sum 1 2 3 4 5
The result is: 15

ytrew
Автор

Why string entered using fgets gives the string length more by 1 but string inputted using gets gives correct string length?

VashishtArora
Автор

How string length is printing more then size of char array, if give input more then char array?

neerajmahapatra
Автор

why is the first parameter of fgets not allowed to type the array name in it ???

daniel_liu_it