C Programming Tutorial – 35 – puts and gets

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


shizyninjarocks says:

Thanks so much. This clarified a ton of questions I had while going over my class notes. Keep the great videos coming, you magnificent bastard!

John Seed says:

Two counts of using deprecated function gets(), three counts of using insecure strcat(), totalling five counts of overflow vulnerabilities.  Should find someone who teaches better or it’ll come back around and bite you in the ass.

Mu'nisa says:

U r my hero !!! Thx

StarMedia StarMedia says:

Amazing code puts and gets 🙂

Christopher Robles says:

You are the fucking man!!!!!

GG says:

so why didnt we use put from the start instead of printf?

Umair Rehmat says:

How to enter a string via puts and not have a new line at the end?

Jhinuk Noman says:

why in the following code the strcat section doesn’t work .why ?


int main()

char eatersname[15];
char foorname[15];
char sentence[100]=””;

puts(“enter eaters name”);

puts(“enter foods name”);

strcat(sentence,”loves to eat”);

return 0;

Ruairoquai says:

I typed this code out, but I’ve noticed something odd. When I’m making the string variables, when I change the numbers, a bunch of random symbols come up in the output. For example when I use 50 for catsFood, instead of 25, a “>” comes up at the start of the sentence.

atna mas says:

NOOOO WAYYY ! . Just found out my teacher always use Bucky’s examples. Can’t believe it I am paying her to teach me. Its not fair !! Bucky you are my heroo.

Thomas Tuan Nguyen says:

what happened to the girl you were trying to talk to?>

Nosferatu says:

why didn’t you say that before man.

Mo's TV says:

use gets but my terminal keep giving me this message:
warning: this program uses gets(), which is unsafe.
Ned help

Michal Pitr says:

Can you use variables inside of puts? like when I want to print out an int I got from the user before, or I gotta insert it into a string via strcat?

Dennis Liu says:

you are always the best explainer !!

jacksonpark1 says:

NEVER EVER USE GETS!! Do not use gets in C, its corrupt and causes lots of fatal bugs and memory leaks.

Michael Rayner says:

Is puts and gets functions only useful when using strings? Is why we don’t just use them instead of printf and scanf due to space usage?

Fahad Anwar says:

Thanks for the helpful video

Dickpuncher says:

i get some wierd characters in my cmd window when it outputs the values entered dunno why

Paul Alexander Hasfjord says:

Hi, I get some strange error message when I try to compile the file.
“warning: implicit decleration of function ‘gets’

What does this mean ?

Alba MK says:

I don’t understand why is he using puts() instead of printf(). Do they both have the same objective?

Harry Chan Nyein says:

I like to eat McStanky’s pussy

Great Adib says:

haha name is pussy loves to eat cumm!!! so funny man;

Niiles Punkari says:

my compiler did not allow this.

Why is the gets function so dangerous that it should not be used?

Wadah Taha says:

can we use gets for ‘int’ type variable ??

Stuart Reilly says:

Can you zoom in please? Thanks for educating us

Umer Tariq says:

why do we use number infront of chars??

DerSohnDesAlvaters says:

every one says use fgets, but I am not sure how to use it…

 Write a comment


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

Please click below to support us on Facebook!