Posted by : Andreas Kwan
Rabu, 05 November 2014
- What are the arguments for and against Java’s implicit heap storage recovery, when compared with the explicit heap storage recovery required in C++? Consider real-time systems.
Answer :
Implicit eliminates the creation of dangling pointers. Disadvantage : cpu-time to do recovery, sometimes when there’s plenty of heap storage so recovery isn’t necessary.
- What are the arguments for the inclusion of enumeration types in C#, although they were not in the first few versions of Java?
Answer :
Java are strongly typed in the same sense as Ada. Types can be explicitly cast, which could result in a type error. However, there are rules of a language have an important effect on the value of an arithmetic operator with one floating-point operand and one integer operand is legal. The value of the integer operand is coerced to floating-point, and a floating point operation takes place. This is what is usually intended by the programmer.
- What would you expect to be the level of use of pointers in C#? How often will they be used when it is not absolutely necessary?
Answer :
In C#, memory address pointers can only be used within blocks specifically marked as unsafe, and programs with unsafe code need appropriate permissions to run.
c code examples for beginner programmers
BalasHapuscalculate Area of a Polygon in c programming