1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zvonat [6]
3 years ago
7

Assume the following variable definitions int a = 5, b = 12; double x = 3.4, z = 9.1. What are the values of the following expre

ssions?
a) x * a.
b) static_cast(x) * static_cast(z).
c) static_cast(x * z).
d) static_cast(b).
Computers and Technology
1 answer:
levacccp [35]3 years ago
4 0

Answer:

a) 17, b) 27, c) 30, d) 12

Explanation:

a) x * a

3.4 * 5 = 17

b) static_cast<int>(x) * static_cast<int>(z)

Casting a value to int makes it an integer. The above one equals int(3.4) * int(9.1) = 3 * 9 = 27

c) static_cast<int>(x * z)

Casting a value to int makes it an integer. The above one equals int(3.4 * 9.1) = int(30.94) = 30

d) static_cast<double>(b)

12

You might be interested in
What should be done if a system cannot boot from the hard drive?
White raven [17]
If the system cannot boot from the hard drive, then you should boot from the windows set-up dvd

I hope this helps! :)
3 0
3 years ago
What is the advantage of maintaining a list of keywords while creating a design blueprint?
elixir [45]

Creating a list of keywords and using them throughout your site helps move pages up the ranks of search engines like Bing or Google. They also attract website visitors. Technically, maintaining a list of keywords while creating a webpage is important in search engine optimization.






8 0
3 years ago
Read 2 more answers
_____ is used to temporarily hold small units of program instructions and data immediately before, during, and after execution b
Mazyrski [523]

Answer: A register

Explanation:

Registers are small memory used to store data or values and supply them to the processor as and when needed. These register hold the data temporarily and hold small units of program instructions. So whenever the CPU wants to work on data they have to be made available through the registers. Even after a arithmetic operation the registers serve as buckets for holding the value.

There are different types of registers such as register A, B, C etc and these registers lie in close proximity to the CPU so that we could provide the data immediately and much faster when asked by the CPU.

Therefore we can say that registers are used to temporarily hold small units of program instructions and data immediately before, during, and after execution by the central processing unit (CPU).

8 0
3 years ago
What is the big-O performance estimate of the following function?
larisa [96]

Answer:

The time complexity of the code is O(log₇n).

Explanation:

The i is updated by 7*i.On each iteration i is multiplied by 7.So on finding the time complexity of the code given above it will come out to  be log base 7.

When we divide the input by 2 the time complexity is log base 2.

So on dividing it by 7 we get the time complexity of log base 7.

8 0
3 years ago
Read 2 more answers
Gina wants to consistently format the headings in all of her worksheets.. . Which is a quick way to do so?. A)Format the heading
ziro4ka [17]
I'd say that if <span>Gina wants to consistently format the headings in all of her worksheets, the quickest way to do so is to B. right-click the sheet tab, select All Sheets on the shortcut menu, and then format the text in the active worksheet.
This way, she will include all the headings she wants to format. 
</span>
6 0
3 years ago
Other questions:
  • Philip is thinking about customizing his motorcycle. A paint job, saddlebags, and a radio would cost $600. His motorcycle is old
    15·2 answers
  • Which type of security threat installs to a computer without the user's knowledge and then monitors all computer activity?
    12·2 answers
  • An electronic braille embosser that translates text from a braille keyboard to a printer:
    10·1 answer
  • Digital libraries are often available to students and/or employees at colleges, schools, and BLANK institutions.
    15·1 answer
  • Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volu
    11·2 answers
  • _____ is the software that protects you computer from harmful files, Trojan horses, and worms.
    13·2 answers
  • How would you define media literacy?
    12·1 answer
  • _____ describes the layout of the screen. Block-based, Interface, Editor, Player
    11·2 answers
  • How to use access?<br> like working in access and bringing tables and stuff
    5·1 answer
  • Widow in respect to word processing ​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!