Шукаєте відповіді та рішення тестів для Objektinis programavimas C++ (BIO+INFO, egzaminas)? Перегляньте нашу велику колекцію перевірених відповідей для Objektinis programavimas C++ (BIO+INFO, egzaminas) в emokymai.vu.lt.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
Pretend you are a machine executing the code provided below, in the exact order that a machine would execute it. Assume the variables have the following values before starting: x = 1, y = 3. Track the use of the variable named y. Every time the variable is used as a left value (i.e. changed in memory), note (eg. write it on paper) the new value. Every time the variable is used as a right value (i.e. read from memory), note the (old) value. To provide an answer construct a string containing only digits and no spaces or other symbols, from the values you have written down, in that exact order.
for( ; 1; ) if (y < x++) break;
Let myText be the name of a character array (char []) containing the contents of a text string "I hope that you are doing well".
Using the name myText, what expression would you write to access (represent, read of modify) the last letter 'o' in this current array?
Important: you do not need an expression to return a character in any string, just the expression to return the particular character in this particular string.
Let str be a string. Write an expression that returns an index of the first occurrence (assume there is one) of "hello" in str.
Pretend you are a machine executing the code provided below, in the exact order that a machine would execute it. Assume the variables have the following values before starting: x = 1, y = 3, z = 5. Track the use of the variable named z. Every time the variable is used as a left value (i.e. changed in memory), note (eg. write it on paper) the new value. Every time the variable is used as a right value (i.e. read from memory), note the (old) value. To provide an answer construct a string containing only digits and no spaces or other symbols, from the values you have written down, in that exact order.
while (x + 1 > 0) z = x--;
Pretend you are a machine executing the code provided below, in the exact order that a machine would execute it. Assume the variables have the following values before starting: y = 3, z = 5. Track the use of the variable named z. Every time the variable is used as a left value (i.e. changed in memory), note (eg. write it on paper) the new value. Every time the variable is used as a right value (i.e. read from memory), note the (old) value. To provide an answer construct a string containing only digits and no spaces or other symbols, from the values you have written down, in that exact order.
for (i = z; i > y; --i) z = z + y - i;