Q

Emertxe-News & Blog

Home » Blog » Dangling pointers in C : A practical tutorial
Dangling pointers in C : A practical tutorial
dangling pointers in c

Dangling pointers in C : Use case example

Dangling pointers in C – Usage and how to prevent them. Great guide for C newbies and Embedded systems programmers. Tutorial with practical examples.

Dangling pointers are those that do not point to valid objects. Pointers are like sharp knives that have tremendous power in C programming. When used properly, they reduce the complexity of the programs to a great extent. But when not used properly, they result in adverse effects and, in the worst case scenario, may crash the system. In this article, focus is given on dangling pointers and what causes them by looking at several different situations in which they occur. I also suggest simple methods to avoid them.

As embedded systems programmer we often get into issues with pointers, we hope this simple tutorial will give you practical insights. This was published in Open Source For U (OSFY) March 2015, authored by one of our mentors.

Below URL is to download the PDF version of the article (dangling_pointers_in_c.pdf), let us know what you think about this tutorial.

Dangling Pointers in C : Avoid them strictly (Download PDF)

YOU MAY ALSO LIKE

Our Training Programs for Freshers

Our Training Programs for Freshers

Introduction: Emertxe is the leading training institute in Bangalore for Embedded Systems and IoT domains. It is a pioneer in training freshers since 2003 by providing excellent placement opportunities for freshers. Over the years 70000+ students have made their...

Difference between typedef and macro in C

Difference between typedef and macro in C

Introduction In any programming language, there are a set of keywords available, which can’t be used as variable name. It is because keywords are reserved and they have a special meaning. Keywords which are also called as reserved names can be anything like a command...

Emertxe and ESSCI launch Virtual Internships for Engineering students

Emertxe and ESSCI launch Virtual Internships for Engineering students

Emertxe, India’s premier embedded systems engineering finishing school, has provided more than 650+ students placements in 2019-20 alone. During 2020, amidst challenging pandemic times it continues to support students with placement opportunities and new programs via...

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *