Skip to content

Conversation

@Raghav-Somasundaram
Copy link

#182)

Add detailed comments explaining that the C code example contains undefined behavior when returning a pointer to a local variable. This example is intentionally shown to demonstrate how Go differs from C in memory management - Go handles this safely while C results in undefined behavior.

This resolves the misleading nature of the slide example and helps students understand the key differences between C and Go's approach to memory and pointers.

…edHatOfficial#182)

Add detailed comments explaining that the C code example contains undefined behavior when returning a pointer to a local variable. This example is intentionally shown to demonstrate how Go differs from C in memory management - Go handles this safely while C results in undefined behavior.

This resolves the misleading nature of the slide example and helps students understand the key differences between C and Go's approach to memory and pointers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant