<u>Answer:</u>
<em>int fNumber,scndNumber = -1, </em>
<em>dup = 0;
</em>
<em>do {
</em>
<em>cin >> fNumber;
</em>
<em>if ( scndNumber == -1) {
</em>
<em>scndNumber = fNumber;
</em>
<em>}
</em>
<em>else {
</em>
<em>if ( scndNumber == fNumber )
</em>
<em>duplicates++;
</em>
<em>else
</em>
<em>scndNumber = fNumber;
</em>
<em>}
</em>
<em>} while(fNumber > 0 ); </em>
<em>cout << dup;
</em>
<u>Explanation:</u>
Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>
<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.
Answer:
B. Monitor backlighting
Explanation:
The computer system is a machine that can digitally receive input, process the inputted data and display and save results. The computer system is a physical system driven by a software component.
The computer hardware components are classified as input unit or devices, output unit, memory and storage unit, and processing unit. The screen is an output unit of the computer system, it displays the output or result of the processed data.
The power supply to the screen, in this context, is not faulty due to the other screen used in testing the supply and input connectors. The back light on the screen has failed and that is why the brightness can not be adjusted.
Answer:
Assuming this is 0 based array indexing, it would look like this...
[ 5, 6, 10, 7, 3, 2.5 ]
[ 0, 1, 2, 3, 4, 5, 6 ]
The index of 7 would be 3.
An administrator is writing into a database and received an error detailed in the exhibit. The two steps to be taken to resolve this are :
Move the Execute SQL statement to be between Connect and Disconnect. Move the Prompt Message to be before the Disconnect statements.
Explanation:
- Dynamic SQL refers to SQL statements that are generated at run-time.
- To disconnect from a database, in the Database Navigator or Projects view, click the connection and then click the Disconnect button in the toolbar or click Database -> Disconnect on the main menu
- You can also right-click the connection and click Disconnect on the context menu
- The PROMPT command may be used to display messages to the user, perhaps supplying a short summary of what your script is going to accomplish.
- The SQL EXECUTE command executes an SQL command and binds the result to 4D objects (arrays, variables or fields).
- A valid connection must be specified in the current process in order to execute this command. The sqlStatement parameter contains the SQL command to execute.