How do you declare variables and constants.explain with example?

1 answer

Answer

1265328

2026-08-27 20:50

+ Follow

Depends on the programming language you are using. I will give two simple examples.

In Command Prompt and when creating a batch file, you declare a variable by entering the "set" command. You can use different switches to change the type of variable you are declaring.

/p makes the variable able to accept user input.

/a makes the variable a numerical expression.

In Python, you declare a variable just by stating the name of the variable and its value.

x = value.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.