Data Type, Variable, Format Specifier, Input, Output, String - 33

Problem Set 1.1: Data Type, Variable (Declaration, Assignment, Initialization), Format Specifier, Output, Input, String [27]

  1. Variable Declaration (Data Type (Primitive Data Type))

    1. [1] Declare an integer variable.

    2. [2] Declare a float variable.

    3. [3] Declare a double variable.

    4. [4] Declare a character variable.

  2. Assignment (Assignment Operator)

    1. [5] Assign an integer value to an integer variable.

    2. [6] Assign a fraction value (single precision floating point number) to a float variable.

    3. [7] Assign a fraction value (double precision floating point number) to a double variable.

    4. [8] Assign a character value to a character variable.

  3. Initialization (Assignment on Declaration)

    1. [9] Initialize an integer variable.

    2. [10] Initialize a float variable.

    3. [11] Initialize a double variable.

    4. [12] Initialize a character variable.

  4. Output (Format Specifier) (After Assignment or, Initialization) (Garbage Value Demonstration)

    1. [13] Print the value of an integer variable.

    2. [14] Print the value of a float variable.

    3. [15] Print the value of a double variable.

    4. [16] Print the value of a character variable.

  5. Input

    1. [17] Input one integer number and print that number.

    2. [18] Input one float number and print that number.

    3. [19] Input one double number and print that number.

    4. [20] Input one character and print that character.

  6. Multiple Input (using scanf() function only once)

    1. [21] Input two integer numbers and print those numbers.

    2. [22] Input two float numbers and print those numbers.

    3. [23] Input two double numbers and print those numbers.

    4. [24] Input two characters and print those characters.

    5. [25] Input one integer and one float/double number and print those numbers.

    6. [26] Input one character and one integer/float/double number and print those values.

  7. String

    1. [27] Declare a String Variable (Repeated: Problem Set 8.2: String)

    2. [28] Assign value to a String Variable (Repeated: Problem Set 8.2: String)

    3. [29] Initialize a String Variable in all possible ways (Repeated: Problem Set 8.2: String)

    4. [30] Print the value of a String Variable (Repeated: Problem Set 8.2: String)

    5. [31] Input a character (Ex: the first character of your name) and display it on the screen (Repeated: Problem Set 8.2: String)

    6. [32] Input one word (string) (Ex: your last name) and print that word (Repeated: Problem Set 8.2: String)

    7. [33] Input one sentence (Ex: your full name) and print that sentence (Repeated: Problem Set 8.2: String)

Last updated