F
feivue
1. In Java, intergers can be assigned to real variales, but not vice versa.
What design principle does this violate? In C, this restriction does not
exist. What design principle does this violate?
2. C use the semicolon as a statement terminator, but also allows a
statement to be empty(that is, consisting of only a semicolon), so that the
following is a legal C program:
main() {
;;;;;;;;;
return 0;
}
Discuss the advantages and disadvantages of this.
What design principle does this violate? In C, this restriction does not
exist. What design principle does this violate?
2. C use the semicolon as a statement terminator, but also allows a
statement to be empty(that is, consisting of only a semicolon), so that the
following is a legal C program:
main() {
;;;;;;;;;
return 0;
}
Discuss the advantages and disadvantages of this.