---
title: "Discussion on \"C in contrast\" | Hashnode"
description: "Discussion on \"C in contrast\". \"C vs Java\""
url: "https://hashnode.com/posts/c-in-contrast/6429691bdac4f0e8aa537c9c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [C in contrast](https://ataullahsyed.hashnode.dev/c-in-contrast?utm_source=hashnode&utm_medium=feed)

"C vs Java"

Apr 2, 2023 · 4 min read · ataullahsyed.hashnode.dev  
Updated Apr 6, 2023  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#c](https://hashnode.com/tag/c)
-   [#cpp](https://hashnode.com/tag/cpp)
-   [#coding](https://hashnode.com/tag/coding)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

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

@ataullahsyed · India

  
[View profile](https://hashnode.com/@ataullahsyed)

Intermediate C, Web Development

Developer based on Jamshedpur. Currently learning new technologies. Rapt learner.

## Responses 1

Markdown supported · ⌘↵ to post

[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.
