Skip to content
0:00 / 0:00

#pointers#malloc#c

C: malloc and functions returning pointers

Joe McCullough

1.7K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2016 to 2026.
  • Presented by Joe McCullough

Beginner. No background in the topic needed.

105K views14 years ago2 recommendations

Programming languagesSystems programmingCMemory management

Joe McCullough explains how to use the malloc function and how to write functions that return pointers in C.

BLOG POST: Contains all code with thorough explanation. vertstudios.com/blog/malloc-functions-returning-pointers/ Explanation and examples of using the malloc function. Also, how to create/use functions that return pointers.

Why it's here

2 people recommend this

What people say. Recommended by multiple users as an intuitive guide to understanding malloc and pointers in C.

u/joequery0in r/programming • Recommends

On “Everything you need to know about pointers in C”

Some more resources I created for C beginners to learn pointers: * Intro to pointers - youtube * Void pointers, malloc - youtube * Double pointers

u/grimvianin r/C_Programming • Recommends

On “How to get better at programming in C”

Try C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Recommends

On “Understand Pointers Intuitively”

Try C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Recommends

On “Resource Help”

Try C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Recommends

On “don't know where to learn the C language while am in uni”

Okay, then I'll suggest: C: malloc and functions returning pointers - Joe McCullough [video

u/grimvianin r/C_Programming • Recommends

On “Am I wrong or correct in, it's not necessary to cast a void pointer from malloc?”

Thanks all and I don't think I have seen so much mention of C++, in a C thread recently :o) It was in this video, 'C: malloc and functions returning pointers by Joe McCullough', I was introduced to not cast the void pointer at 32:52 [video

u/grimvianin r/C_Programming • Recommends

On “Pointers related doubts”

C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Recommends

On “Best way to prepare a C final?”

C: malloc and functions returning pointers by Joe McCulloug [video Learn to program with c by Ashley Mills [video I also use Code::Blocks, because it's easy and fast to install, easy to use, everything is ready from start and it's open source!

u/grimvianin r/C_Programming • Mentions

On “I am a beginner and I don't know what to do”

Try C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Mentions

On “Pointers and memory allocation”

C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Mentions

On “Tips for Grasping C After Programming In Other Languages for so Long”

Try: C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Mentions

On “I need to improve my knowledge.”

Try: C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Mentions

On “How does memory allocation and pointers work in C?”

C: malloc and functions returning pointers by Joe McCulloug [video

u/grimvianin r/C_Programming • Mentions

On “What do I need to be proficient in C”

Try C: malloc and functions returning pointers by Joe McCulloug [video