Looking for Objektinis programavimas C++ (BIO+INFO, egzaminas) test answers and solutions? Browse our comprehensive collection of verified answers for Objektinis programavimas C++ (BIO+INFO, egzaminas) at emokymai.vu.lt.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
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;