Computer Science, asked by varunrathourpcu4cz, 8 months ago


Which of the following code cannot be used to initialize multiple variables with a common value?
a, b, c = 55
a, b, c = 55, 55, 55
a = b = c = 55
a = 55; b = a; c = b

Answers

Answered by ayodyalapriyanka
4

Answer:

a,b,c=55

Explanation:

Answered by Anonymous
0

The code that cannot be used to initialize multiple variables with a common value is:

a, b, c = 55

  • If this option is used, an error will arise stating that the "int" object is not iterable.
  • To initialize variables, other 3 options can be used i.e.

        1. a, b, c = 55, 55, 55

In this type of initialization of variables, in the same line, a, b, c has initialized the value 55

       2. a = b = c = 55

This type of initialization means an integer object is created with the value 55, and all other three variables are then assigned to the same memory location.

      3. a = 55; b = a; c = b

In this, A is assigned the value 55. Then that value is assigned to b and then the value of b is assigned to c.

Similar questions