C Programming Tutorial – 9 – I Need Arrays

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


Darshan G says:

how can we change the 2 letters of a word at a single time as we changed ‘c’ to ‘z’

mariam gamal says:

i don’t understand the example of (char food [ ]=”’tuna”)
why we didn’t mention the number of bits? and why we use the function (strcpr) to change it ?

water says:

strcpy doesnt work for me for some reason, i am using sublime text and everything just works fine but when u type strcpy it just said its not a thing help

Nosferatu says:

not in every programming language it starts with 0. in erlang it starts with 1. (array)

Vicky Mukherjee says:

Can I use strcpy for chaning the value of any integer valued variables? It didn’t work for me.

yerrapotu kiran says:

Thank u Bucky

Tech Geeks4u says:

i saw the “I THINK YOU ARE Aayush Ranjan=ON” when running the following commands:
char name[13] = “Aayush Ranjan”;
printf(“I THINK YOU ARE %sn”,name);

Brian Nguyen says:

I have a question. wouldn’t it be optional to put a number inside the bracket? char name[] = “Bucky Roberts”; would still be fine right?

Kepler says:

name[2] = “x”; Doesnt work. Invalid conversion from “const *char” to “char”.. Memory related.

S&LGaming says:

Always remember when using strcpy that you allocate enough bytes of memory for the buffer you are wanting to write to, otherwise you will cause your program to have a buffer overflow because the data will be forced out of bounds. For example

char tuna[13] = “I Love Tuna”;
strcpy(tuna, “Tuna is the greatest food ever !!!”); <– That right there would overflow the buffer. Always make sure and allocate enough bytes. Otherwise expect bugs and crashes

takeng pame says:

I m try of seeing ur ads

Orangejuice9000 says:

Instead of typing: char name[14] = “Bucky Roberts” could you not leave out the number 14?
I don’t fully understand the reason for inputting the number manually.

Thank you for these videos.

sadeq ghannam says:


int main()
char nsme [13] = “sadeq ghannam”;
printf(“my name is %s n”,”name”);
return 0;
the output will be my name is name
lol can someone figure why ?

jib says:

sir roberts or anyone who can help me in comments section will appreciate about this question
i want to delete the third letter or element of my array and i did it this but it is wrong any help please


int main()

char deleteletter;

char name[13]=”bucky roberts “;

deleteletter =name;

printf(“my is name %s:n”,name);

return 0;
int deleteletter()

char name ;

char deleteletter [2];

printf(“my is name %s:n”,name);


Stanley Chideme says:

Hi bucky, loving your work. I’m kinda having a problem with using strcpy function. I keep trying to use it following your turtorial but I keep getting no change and a message from the log: “C:UsersAdminDesktopc_tutsvmain.c|24|warning: incompatible implicit declaration of built-in function ‘strcpy’|”. please help. thanks

Alacaster Soi says:

easy way to remember
strcpy = string copy

Sophia Kang says:

It’s really good video!!
But I can’t understand why we need to use keyword ‘strcpy’
why do we have to use ‘strcpy’ without just creating another array?

E Garam says:

c-section, bytes of tuna hehe what’s next?
Me and my friend are started watching these lectures from last week and we tacitly agreed to call it as a c-section.

Henry Chitic says:

What is the difference between a variable and an array?

Alacaster Soi says:

bites of tunA

Jesse Potwin says:

Heh, I need “arrays”.

Nicholas Lee says:

This treehouse ad is starting to get very annoying.

Iikka Konola says:

dude, you are making good videos – and i am comparing tutorial videos usually to khan academy videos(which are generally brilliantly made by education pros). Thanks!

Gravice says:

I love you. You have no idea how much I appreciate this tutorial series
I want your babies

Dheeraj verma says:

Can I use strcpy for chaning the value of any integer valued variables? It didn’t work for me.

TheHades Hell says:

what is difference between writing and not writing bytes no. after char in bracket?

Syed Tihaam Ahmad says:

Why has he created 2 playlists for C programming tutorials ?

Captian Shrey says:

It Says “U” After String.

Ilan Schvartzman says:

But tuna is length 5 and bacon is length 6. how come it worked?

William Berkeley Trimble says:

You didn’t explain arrays good enough

ايهاب فهمي says:

hi i wrote a program but i have this messege
is not a function or function pointer


int main()
char name[11]=”ehab fahmy”;
printf(“who is %s n”,name);

name(2) = ‘z’;
printf(“who is %s n”,name);

return 0;

Osmifor Centrio says:

What about 13 and 14th element of the array

Seven Day says:

So, what if I want a program to mangle the user’s name, and then get it right immediately afterwards? How do I undo “arrayname[x] = y”, so it is only wrong once?

Lowinator says:

to your header in order to get rid of the implicit declaration warning.

Sachiyo Daley says:

Hey does anyone know if printf(name[2]); should run successfully and print a ‘z’ if placed at the end of the code?
My computer doesn’t seem to like it and keeps saying not responding :/
I close the “not responding” message and it has the rest of the code but not that that bit, anybody know why??

Maple Foong says:

hi i got a question about array,

const int NUM_EMPLOYEES = 6;
int hours [NUM_EMPLOYEES];

printf (“Enter the hours worked by six employees: “);
scanf (“%d”, &hours[0]);
scanf (“%d”, &hours[1]);
scanf (“%d”, &hours[2]);
scanf (“%d”, &hours[3]);
scanf (“%d”, &hours[4]);
scanf (“%d”, &hours[5]);
scanf (“%d”, &hours[6]);

printf (“The hours you entered are: “);
printf (“%d “, hours[0]);
printf (“%d “, hours[1]);
printf (“%d “, hours[2]);
printf (“%d “, hours[3]);
printf (“%d “, hours[4]);
printf (“%d “, hours[5]);
printf (“%d “, hours[6]);

return 0;

above is what I type, the size of array is 6 but the index i make it 7 but still can run why ? I mean i also able to key in 7 input and show 7 output.

0dimitris9 says:

You have to include cstring for strcpy to work.

fynn karn-wadden says:

LOL  “your gonna sell this badboy to microsoft fior millions”

Ashish Rai says:

how can we create an array for storing number? is it even possible? do we even have to do it that way? is just creating a variable enough?

Mathew Ingham says:

At 3:20, you said that you don’t need to write 5 to assign the memory because it counts it automatically, why doesn’t this happen with name?? Could you leave the name[ ] blank and have it count it automatically?? Thanks.

P says:

When I do strcpy(food, “bacon”); and then printf food, it prints “tunabacon”. What’s up with that?

Darren Bean says:

Thanks for the tutorial Buzky. But I am getting an error. My code is identical except I use my name (and adjust the number for the array accordingly). But whatever value I put for name[2] = “z” (or “b” or anything), the output on the second line displays a 4 at that position (it reads “da4ren”). Any suggestions to fix this?

Kentastrophe says:

I just got the joke of the title… XD

“Arrays” is like saying “A raise” =P

Jason Heard says:

// Thanks!

Shehwar's Studio says:

hey buddy, I did the thing that is shown here which changes a particular letter in a string but I got a “?” instead of the replacement character that I typed in.

for example taking the video’s example :

my name is “Bu?ky Roberts”

any help is highly appreciated !

Sheikh Spear says:

Man i am using DEV by bloodshed ; it shows an error on
printf(“The best food is %sn” , food);

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