Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

STM32 Tutorial #38 – DEMYSTIFYING C Arrays and Strings

1.3K views on YouTube

Digging more into C pointers, arrays and strings.

Follow up on https://www.youtube.com/watch?v=Ip2J2jxZYaA

As usual please consider liking and subscribing if you like this video. If you don’t like it – please explain why so I can improve future videos.

STM32World wiki: https://stm32world.com/wiki
Project Files: https://github.com/STM32World/stm32fun

#stm32 #c #arrays #pointers #strings #stm32world

00:00 Intro
00:46 Responding to an earlier comment
02:51 Explaining that arrays _are_ pointers (even if they have a different syntax)
03:59 Why arrays are dangerous – very very dangerous and great care must be used
06:50 Diving into strings
09:05 Investigating strings in the debugger
12:40 Introducing string copy strcpy
15:59 Concatenating (adding) strings strcat
16:46 Examining the string.h and Wikipedia on C String handling
18:40 Allocating buffer on the heap (and me being an idiot)
21:50 An experiment going wrong
25:05 Introducing string compare strcmp
27:10 Introducing string search strstr
28:05 Protecting against buffer overflow
31:00 Outtro