---
title: "Comment by Wellington Domiciano on \"C in contrast\" | Hashnode"
description: "Great comparison, but C doesn&#39;t have operator overloading, C++ does. And about &quot;automatic variables&quot;, if you call malloc() inside a function, you"
url: "https://hashnode.com/posts/c-in-contrast/6429691bdac4f0e8aa537c9c/comment/642cc203480bd310626c06db"
---

[Discussion](https://hashnode.com/posts/c-in-contrast/6429691bdac4f0e8aa537c9c)

Comment [C in contrast](https://hashnode.com/posts/c-in-contrast/6429691bdac4f0e8aa537c9c)

[Wellington Domiciano](https://hashnode.com/@wldomiciano)

[Apr 5, 2023](https://hashnode.com/posts/c-in-contrast/6429691bdac4f0e8aa537c9c/comment/642cc203480bd310626c06db)

Great comparison, but C doesn't have operator overloading, C++ does.

And about "automatic variables", if you call `malloc()` inside a function, you yet must call `free()`.

In this line of reasoning, Java has "automatic variables" too, but only for primitive values.

[Syed Ataullah Bokhari](https://hashnode.com/@ataullahsyed)

[Apr 6, 2023](https://hashnode.com/posts/c-in-contrast/6429691bdac4f0e8aa537c9c/comment/642cc203480bd310626c06db#reply-642eb8fca632112908c2b5e2)

Agreed, malloc() in C is used to dynamically allocate memory with the help of pointer variables.
