CIS 155 Review Exercises Chapters 11-12

CIS 155 UNIX Operating System, Review Exercises
Chapters 11-12 Questions and Answers.
Examples:
Chapter 11 Review Exercises.

1. Explain the steps necessary to write a program and produce an executable file.
The steps necessary to write a program and produce an executable file are: create the source file (source code) written in preferred programming language using an editor of choice; create the object file (object code/object module) by using a compiler or interpreter to translate the source code into machine language; create the executable file (executable code/ load module) by using the link editor to bring all referenced programs, that may not be part of the object module, together.

3. What is the function of a compiler?
he main function of a compiler is to translate your source code or program instructions into machine code so the computer can understand your instructions. Also the compiler is a system software program that translates high-level program instructions into machine language that the computer can interpret and execute. It compiles the entire program at one time and does not give you any feedback until it compiles the entire program. A separate compiler is required for each programming language you intend to use on your computer system. To execute C++ and Pascal programs, you must have a C++ compiler and a Pascal compiler. Compilers produce a better and more efficient object code than interpreters, so a compiled program runs faster and needs less space.

5. What is the command to compile a C++ program, and what is the default name of
the executable file?
$ g++ first.cpp [Return]
By default, a.exe is the name of the executable file.


Download Now
(sent via email)

Leave a Reply