Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Photoshop Graphic Design Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Mindfulness Personal Development Meditation Personal Transformation Life Purpose Emotional Intelligence CBT
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Data Science
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee
Development Programming Languages C

Advanced C Programming: Pointers

Master pointers, addresses and memory allocation in C
Rating: 4.6 out of 54.6 (2,089 ratings)
10,684 students
Created by Huw Collingbourne
Last updated 8/2019
English
English [Auto], Indonesian [Auto], 
30-Day Money-Back Guarantee

What you'll learn

  • Pointers and addresses
  • Indirection and multiple indirection
  • Generic pointers and casts
  • Memory allocation and reallocation
  • Pointer arithmetic
  • Singly and doubly linked lists
  • Queues and stacks
  • Deep and shallow copying
  • Common pointer errors
Curated for the Udemy for Business collection

Course content

4 sections • 65 lectures • 3h 51m total length

  • Preview02:44
  • Preview03:14
  • Course Notes and FAQ
    00:27
  • Source Code Archive
    00:28
  • What is a pointer?
    03:38
  • Pointer variables
    03:11
  • Indirection
    01:51
  • Pointer Basics
    4 questions
  • Study Notes – Step One
    00:09

  • What is the relationship between a pointer and an array (or string)?
    Preview03:46
  • How to display pointer values
    00:06
  • Preview05:50
  • Multiple indirection
    01:41
  • Multiple indirection with integers
    08:00
  • Multiple Indirection with strings
    04:57
  • Indirection and commandline args
    03:20
  • Generic Pointers
    04:44
  • Allocating memory
    05:40
  • Malloc and sizeof
    04:44
  • Functions that cause errors or warnings
    02:49
  • calloc
    04:22
  • free
    03:07
  • realloc
    04:03
  • Pointer arithmetic
    05:03
  • Calculating an array index
    03:36
  • Pointers to structs
    06:47
  • Data type alignment
    08:45
  • Type alignment on boundaries
    02:06
  • Type alignment and pointer arithmetic
    02:16
  • Debugging C Programs
    11:17
  • Debugging Multiple Indirection
    08:18
  • Addresses and Indirection
    4 questions
  • Study Notes – Step Two
    00:09

  • Arrays and Lists
    01:26
  • What is a linked list?
    03:40
  • Singly linked lists
    04:55
  • To free or not to free?
    00:45
  • Doubly linked lists
    02:10
  • Programming a doubly-linked List
    03:20
  • Initializing a doubly-linked list
    01:10
  • Implementing a doubly linked list
    10:09
  • What is a queue?
    02:35
  • Queues
    04:23
  • What is a stack?
    02:10
  • Stacks
    02:27
  • Pushing and popping
    05:05
  • Calculating the length of list
    03:15
  • Copying a list
    04:02
  • Removing an element from within a list
    06:17
  • Adding an element into a list
    04:49
  • Function pointers
    01:04
  • Function pointer declarations
    03:38
  • An array of function pointers
    03:32
  • Lists and Data Structures
    4 questions
  • Study Notes – Step Three
    00:09

  • Why do pointers cause problems?
    01:39
  • Deep and shallow copies
    03:54
  • A deeper look at deep and shallow copies
    07:31
  • Incorrect memory allocation
    01:56
  • Casting pointers
    02:09
  • Incorrect casts
    03:30
  • Freeing already freed memory
    03:06
  • Memory leaks
    03:09
  • Using freed memory
    02:13
  • Pointers out of scope
    04:12
  • Dereferencing a null pointer
    01:40
  • Common pointer problems
    4 questions
  • Study Notes – Step Four
    00:09
  • And finally...
    04:30

Requirements

  • You should understand at least the basics of C programming

Description

To be an expert C programmer you need to master the use of pointers. This course explains pointers in real depth. It explains pointer variables, pointer arithmetic, indirection, memory allocation, how to create and maintain linked lists and how to use function pointers. In fact, by the time you finish this course, you will know pointers inside out. You will understand what they are, how they work and how to make sure that they don’t make your programs crash!

This is not a course for beginners. It is aimed at programmers who already have a good working knowledge of C programming and who need to take the next step in mastering C by gaining a deep understanding of pointers.

If you’ve struggled with pointers  and can’t quite figure out what all those ‘arrow diagrams’ really mean or what exactly is the relationship between pointers and addresses, this is the course for you. In a series of short, tightly-targeted lessons, you will learn all about: 

  • computer memory and how pointers access it
  • how memory is allocated 
  • why copying data using pointers can cause program errors
  • why some pointers are ‘generic’ 
  • what happens when you ‘cast’ pointers to specific types
  • how to create singly and doubly linked lists
  • how to use stacks and queues
  • how to avoid memory leaks and other common problems
  • ...and much more.

The source code for all the example programs is provided, so if you need to try out my code you can load it and run it in your preferred C IDE or code editor.

Who this course is for:

  • Any C programmer who needs to understand pointers in depth

Featured review

Anime Fanboy
Anime Fanboy
79 courses
6 reviews
Rating: 5.0 out of 58 months ago
Great course to understand the intricacies with pointers. The instructor has covered bunch of topics that are commonly used in complex projects. I would love to see more visualizations on how the stack and heap memory management happens on the computer memory.

Instructor

Huw Collingbourne
Director of Technology, SapphireSteel Software
Huw Collingbourne
  • 4.4 Instructor Rating
  • 9,186 Reviews
  • 78,722 Students
  • 16 Courses

  Huw Collingbourne is the technology director at SapphireSteel Software, developers of programming tools for Microsoft Visual Studio. He is author of The Little Book Of C, The Little Book Of Pointers and The Little Book Of Recursion from Bitwise Books and of The Book Of Ruby from No Starch Press. He runs Bitwise Courses and teaches courses on a range of programming topics. 

     Huw has been a programmer for more than 30 years. He is a well-known technology writer in the UK. For over ten years he wrote the Delphi and Java programming column for PC Plus Magazine.  He has also written numerous opinion and programming columns (including tutorials on C#, C++, Smalltalk and Ruby) for a number of computer magazines, such as Computer Shopper, PC Pro, and PC Plus. 

     In the 1980s he was a pop music journalist and interviewed most of the New Romantic stars, such as Duran Duran, Spandau Ballet, Adam Ant, Boy George, and Depeche Mode. He is now writing a series of 1980s murder mysteries. 

     At various times Huw has been a magazine publisher, editor, and TV broadcaster. He has an MA in English from the University of Cambridge and holds a 2nd dan black belt in aikido, a martial art which he teaches in North Devon, UK. The aikido comes in useful when trying (usually unsuccessfully) to keep his Pyrenean Mountain Dogs under some semblance of control. 

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.