Ask Question
15 March, 09:49

Write an expression whose value is the result of converting the int value 42 to a str (consisting of the digit 4 followed by the digit 2).

+3
Answers (2)
  1. 15 March, 09:51
    0
    To write in standard form

    make the value in between (1 - 9.9) by placing a dot

    = 4.2

    count the number of times you moved the dot.

    Left means to a - power

    Right means to a + power

    (Don't forget to put * 10, it is the most essential thing that allow you to move the decimal place)

    = 4.2*10^1

    To check answer:

    Anything to power one is the value itself

    10^1 = 10

    So, 4.2 * 10 = 42
  2. 15 March, 09:59
    0
    char numb[2];

    numb[0] = 52;

    numb[1] = 50;

    Print as a string

    printf ("%s/n", numb)

    Step-by-step explanation:

    A string is the same as a vector of char.

    We have to find the ASCII values of '4' and '2'

    '4' has an ASCII value of 52

    '2' has an ASCII value of 50

    Expression:

    char numb[2];

    numb[0] = 52;

    numb[1] = 50;

    Print as a string

    printf ("%s/n", numb)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write an expression whose value is the result of converting the int value 42 to a str (consisting of the digit 4 followed by the digit 2). ...” in 📗 Mathematics if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers