190k views
5 votes
Which of the following languages are type safe?

(a) C (b) C++ (d) Java (e) Javascript (f) ML (g) Lisp

User Fandro
by
8.3k points

1 Answer

2 votes

Final answer:

Java, ML, and Lisp are type-safe languages.

Step-by-step explanation:

Out of the given options, the type-safe languages are Java, ML, and Lisp.

A type-safe language ensures that there are no memory-access violations or type errors. It enforces type checking during compile-time and prevents operations that could lead to undefined behavior.

For example, Java is a strongly typed language that checks for type compatibility at compile-time, while Lisp is dynamically typed but provides type safety through runtime type checks.

User Mike Fischer
by
8.3k points