CSE 278 Lecture 19: Casting, Pointers, Assembly, and Registers

30 views2 pages

Document Summary

Can cast to avoid a compiler error. This type of casting originated with c and may or may not require a runtime conversion. In this case, data has to be reinterpreted. You cay convert data to other types using parameterized methods. Static_cast(): no runtime checking, use only when you know cast will be correct. Suppose we have double and we want to extract individually the 8 bytes. In other words, we want to reinterpret the 8 bytes to investigate the ieee 754 format. In general, non-converting type casts are used for interpreting array of bytes or specialized numerical algorithm which requires extracting mantissa. They are called this because they can be run anywhere. Modern high-level programmers discourage the use of pointers for reasons like. The stack (each member represented by activation record) are automatically freed. But heap objects, for example, objects that are created as a result of new, are not. To return the object space must be done explicitly.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers