Which one of the following is correct way of declaring and initialising a variable, x with value 5?
int x;
x=5;
int x=5;
int x=5
Answers
Answered by
3
Explanation:
correct way of declaring and initialising a variable
int x=5;
Answered by
1
Answer: Option 2. (x=5;)
Explanation: As the following is the correct way of declaring and initializing a variable, x with value 5,
The section focuses on the "Variables And Operators", And the Variable names in Python cannot start with numbers. However, it can contain numbers in any other position of the variable name. Variable names can start with an underscore. The data type of variable names should not be declared.
As one of the following is the correct way of declaring and initializing a variable, x with a value of 5 is x=5.
#SPJ3
Similar questions
Environmental Sciences,
1 month ago
Chemistry,
3 months ago
Math,
10 months ago
Math,
10 months ago
Biology,
10 months ago