0

Recently, I am studying whether C language is strong type language or not.

As far as I know, it is said that C language cannot be strongly typed language due to Union, void pointer, and type casting operator, but I couldn't find a detailed explanation for the specific example.

Could you explain it by giving an example with a specific code?

  • Note that you _can_ use `union`, `void*`, and the cast operator safely by using them with tag values (i.e. as _discriminated unions_, runtime-checked pointers, etc) - otherwise your question could also propose that C# and Rust are not strongly typed because C# and Rust both have `unsafe` modes (it's just that in C it's _easy_ to do the wrong thing and _difficult_ to do it safely). – Dai May 01 '20 at 10:12
  • Thanks for your commenting. Have a good day! :) – Soohyun Jang May 01 '20 at 10:35

0 Answers0