Name : Vina Melinda
NIM : 1801380106
NIM : 1801380106
Untuk kali ini saya akan menjawab Assignment #1 Review Questions dari Chapter 1 Introduction dari Sebesta.
Q&A session:
6. Q : In what language is most of UNIX written?
A : In C language because it is relatively easy to port or move to different machines.
6. Q : In what language is most of UNIX written?
A : In C language because it is relatively easy to port or move to different machines.
7. Q : What is disadvantage of having too many features in a languange?
A : Awareness of a wider variety of programming language features can reduce limitations in software development. The basic simplicity of reading a program could be lost. The simpler and more user-friendly programming languages allow for a smoother creation process, especially if there are many people working on the same code.
A : Awareness of a wider variety of programming language features can reduce limitations in software development. The basic simplicity of reading a program could be lost. The simpler and more user-friendly programming languages allow for a smoother creation process, especially if there are many people working on the same code.
8. Q : How can user-defined operator overloading harm the readability of a program?
A : Because the built in operator has the precision and compiler knows all the precision between the operators, and it works on that precision. User can also create its own operator but the compiler does not come to know thow to make precision of this operator. Therefore we don't use user defined operator.
A : Because the built in operator has the precision and compiler knows all the precision between the operators, and it works on that precision. User can also create its own operator but the compiler does not come to know thow to make precision of this operator. Therefore we don't use user defined operator.
9. Q : What is one example of a lack of orthogonality in the design of C?
A : Condider the following rules and exception in C. Although C has two kinds of structured data types, arrays and records(structs), records can be returned from functions but array cannot. A member of structure can be any data type except void or a structure of the same type. An array element can be any data type except void or a function. Parameters are passed by value, unless they are arrays, in which case they are, in effect, passed by reference(because the appearance of an array name without subscript in a C program os interpreted to the address of the array's first element).
A : Condider the following rules and exception in C. Although C has two kinds of structured data types, arrays and records(structs), records can be returned from functions but array cannot. A member of structure can be any data type except void or a structure of the same type. An array element can be any data type except void or a function. Parameters are passed by value, unless they are arrays, in which case they are, in effect, passed by reference(because the appearance of an array name without subscript in a C program os interpreted to the address of the array's first element).
10. Q : What language used orthogonality as a primary design criterion?
A : ALGOL 68
A : ALGOL 68
No comments:
Post a Comment