What is Primitive Type Casting

Primitive Type Casting: C/C++ allows you to cast between totally unrelated types. This can be problematic for model checking. Avoid type casting between unrelated types and in particular primitive
types. For example,

1647_primitive.jpg

Casting between unrelated types requires overhead for keeping values consistent. For primitive types, this also requires creating objects instead of primitives and explicit modeling of the memory and the platform. In languages like Java you cannot even use the immutable standard box types like java.lang.Integer. Furthermore, operations on the primitives have to be turned from direct bytecode instructions into method calls, creating more overhead.

   Related Questions in Programming Languages

  • Q : Programming analysis and design

    Illustrate the term programming analysis and design in brief.

  • Q : Explain Assignment operator Assignment

    Assignment operator: The operator (=) employed to store the value of an expression into the variable, for example: Variable = expression; The right-hand

  • Q : Define Sign bit Sign bit : In

    Sign bit: In 2s-complement notation, the most important bit in an integer value is employed to determine the sign of the value. A 1-bit point out a negative number and a 0 bit point out a positive number.

  • Q : What is Bounded repetition Bounded

    Bounded repetition: The Repetition where statements within a loop's body are executed a fixed number of times and the number of times is established whenever the loop began. There is no control structure in Java which guarantees the bounded repetition

  • Q : State the term snooping State the term

    State the term snooping?

  • Q : What is Pop-up menu Pop-up menu : A

    Pop-up menu: A menu of actions which is generally not visible on the screen till a mouse button is clicked. The Popup menus assist to keep a user interface from becoming cluttered.

  • Q : Explain Out-of-bounds value

    Out-of-bounds value: It is a redundant value employed to point out that a different action from the norm is needed at some point. The read technique of InputStream returns -1 to point out that the end of a stream has been reached, for illustration, ra

  • Q : What is a Port Port: It is a number

    Port: It is a number employed by a procedure to communicate with the other procedure across a network, employing the Transmission Control Protocol (abbreviated as TCP) or User Datagram Protocol (abbreviated as UDP), for instance.

  • Q : Define Keyword Keyword : They are

    Keyword: They are reserve word containing special meaning of the language and cannot be employed as identifier.

  • Q : Define Inconsistent state Inconsistent

    Inconsistent state: A state which an object must not be in. A class requires to be carefully designed in order to make sure that none of its examples can get into a conflicting state. An illustration of an inconsistent state may be a football team wit

©TutorsGlobe All rights reserved 2022-2023.