2.1 Assignment Operator - 11

Problem Set 2.1.0: Assignment Operator [0]

  1. Value Assignment

    1. [1] Assign an integer value to an integer variable. (Repeated: Data Type, IO Problem Set 1.1)

    2. [2] Assign a fraction value (single precision floating point number) to a float variable. (Repeated: Data Type, IO Problem Set 1.1)

    3. [3] Assign a fraction value (double precision floating point number) to a double variable. (Repeated: Data Type, IO Problem Set 1.1)

    4. [4] Assign a character value to a character variable. (Repeated: Data Type, IO Problem Set 1.1)

    5. Assign a variable to another variable. [New]

    6. Assign an array to a variable. [New]

    7. Assign a string to a variable. [New]

  2. Variable Initialization

    1. [5] Initialize an integer variable. (Repeated: Data Type, IO Problem Set 1.1)

    2. [6] Initialize a float variable. (Repeated: Data Type, IO Problem Set 1.1)

    3. [7] Initialize a double variable. (Repeated: Data Type, IO Problem Set 1.1)

    4. [8] Initialize a character variable. (Repeated: Data Type, IO Problem Set 1.1)

    5. Initialize a variable to another variable. [New]

    6. Initialize an array to a variable. [New]

    7. Initialize a string to a variable. [New]

Problem Set 2.1.1: Assignment Operator Exercise [1]

  1. [1] Swap values of two variables using a third variable.

Problem Set 2.1.2: Augmented Assignment Operator [10] (Practice After Assignment and Bitwise Operator Exercise)

  1. Augmented Arithmetic Assignment Operator (Practice After Assignment Operator Exercise)

    1. Add 5 to an integer variable with its previous value.

    2. Subtract 5 to an integer variable with its previous value.

    3. Multiply 5 to an integer variable with its previous value.

    4. Divide 5 to an integer variable with its previous value.

    5. Mod 5 to an integer variable with its previous value.

  2. Augmented Bitwise Assignment Operator (Practice After Bitwise Operator Exercise)

    1. Perform the bitwise AND operation on the variable with the value on the right

    2. Perform the bitwise OR operation on the variable with the value on the right

    3. Perform the bitwise XOR operation on the variable with the value on the right

    4. Perform the bitwise Left Shift by the value on the right

    5. Perform the bitwise Right Shift by the value on the right

Last updated