Answer:
The code will display the following on the screen:-
2
0
2
Explanation:
The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.
Answer:
cout << setprecision(2)<< fixed << number;
Explanation:
The above statement returns 12.35 as output
Though, the statement can be split to multiple statements; but the question requires the use of a cout statement.
The statement starts by setting precision to 2 using setprecision(2)
This is immediately followed by the fixed manipulator;
The essence of the fixed manipulator is to ensure that the number returns 2 digits after the decimal point;
Using only setprecision(2) in the cout statement will on return the 2 digits (12) before the decimal point.
The fixed manipulator is then followed by the variable to be printed.
See code snippet below
<em>#include <iostream> </em>
<em>#include <iomanip>
</em>
<em>using namespace std; </em>
<em>int main() </em>
<em>{ </em>
<em> // Initializing the double value</em>
<em> double number = 12.3456; </em>
<em> //Print result</em>
<em> cout << setprecision(2)<< fixed << number; </em>
<em> return 0; </em>
<em>} </em>
<em />
Answer:
five types of pointing devices
Explanation:
Ponting devices
Pointing means point something and the pointing devices are the input /peripheral devices those are used to point the pointer on the screen. We do move cursor on the screen to open the files or any icon.
There are many types of pointing devices but these are quite common which are given below
- Computer mouse
- Finger on touch screen.
- Joystick.
- Leap Motion.
- Light pen (pen)
1.Mouse
Mouse is most common type of input device that is used for pointing the data on the screen. We press it with our hands and keep pointing the things.
There are three types of mouse
- optical mouse
- wireless mouse
- trackball mouse.
2. Finger on touch screen
In this type of movement the fingers are input devices those we use to see the movement of pointer on the screen and this is most common in this century.
3.Joystick.
Joystick is another input device to point the cursor but it is mostly used in games. Children can use it smartly so it is inculcated in games usually.
4. Leap Motion
The Leap Motion (LM) controller is a latest 3D sensing device for hand posture interaction with a computer. It is having the capability sense the location of the fingers of the hands, as well as the palm position.
5.Light Pen
this is another pointing device which is mostly used to highlight and select the data on the screen.
Note: All of these above pointing devices are most common used now a days. These devices are having new conventions day by day for the ease of user. This era is basically the era of IT ,so the use of computer must be so easy and conventional for the user so, the innovations and improvement in such devices is made side by side.
Since Anil needs to show the overlap of people who live in a certain neighborhood in his city that supports a specific political candidate, the type of conceptual diagram which he should use is a: B: Venn diagram.
<h3>What is a Venn diagram?</h3>
A Venn diagram can be defined as a circular graphical (visual) tool that is typically used for representing, logically comparing and contrasting two (2) or more finite sets of data such as objects, students, events, voters, concepts, people, etc.
In this context, we can reasonably infer and logically deduce that a Venn diagram is a type of conceptual diagram which can be used by Anil in illustrating the overlap of people who are living in a certain neighborhood in his city and supports a specific political candidate in an election.
Read more on Venn diagram here: brainly.com/question/24581814
#SPJ1
Well we just benefit from it like it just helps as I guess