can we create two variables of same name and of different datatype?

1 answer

As you can see from the above reference, the same question can be answered differently for different languages.

In general, most modern programming languages do not permit the same name applied to different types because it would be confusing for the compiler.

There could be exceptions where scalars and arrays have different name spaces (e.g. Perl). Even then, the arrays have a prefix (@). So @name and name are different variables.
Similar Questions
    1. answers icon 1 answer
    1. answers icon 1 answer
  1. Chapter 3 - You must create an application as set below using Python.Name the script SortNumbers.py Ask the user to enter 3
    1. answers icon 0 answers
  2. My questions are:why are variables useful in algebra? Also, what makes the use of variables difficult to understand? Variables
    1. answers icon 0 answers
more similar questions