C Programming Tutorial 52, String Functions pt.3

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Thank you for taking the time on drawing up the memory slots and showing us where the error occurred. That really helps visual learners like myself.

LionHeartZell
Автор

Man, you caught me off guard for a second. I was like awesome this code will work and then it crashed. I appreciate you showing us the crash and then explaining why it crashed; it helps me understand the process.

TheFryeguy
Автор

90 tutorials from you = 1 whole semester with my Computer Science Professor

nguyenangtuandung
Автор

It's because the "" operators return the address of the first character in the string. So if I were to write this string literal in my code:

"Yo my name is Adam"

Then it would just give me it back the address of the Y in memory, then of course following the Y would be the rest of the characters.

iTzAdamX
Автор

"pretty sure its 20 characters"
me: *counts* nope! 18 sir!

simransingh
Автор

video is very helpful, thanks so much.
what IDE is you used to?

gientran
Автор

Does it add a new null to the firstName after strncat?

shikikan
Автор

We do:

char *string = "LOL"

Because we need to point to an array of characters, right?

sonickk
Автор

Watched almost every video of yours but I don't get why we use char *string = "myString" why with the '*' ?

NabilMakhout
Автор

I'm using Turbo C (bec we're forced to) and *firstName works. Can someone please explain it to me why the program didn't crash?

satellitesage