1. What is computer program? Mention characteristics of a good program.
A computer is a set of instructions that tells the computer how to perform particular task and program is made up of language elements, statements and variables.
The characteristics of good program:
- It should use less amount of primary storage.
- It should use few devices.
- It should produce result quickly.
2. What is SDLC (Software Development Life Cycle) ? What are the different phases of SDLC?
It is the process that produces software with the highest quality and lowest cost in the shortest time. It is a step by step process where each stage is a building block of an effective and efficient software.
It involves distinct stages including Analyzing, Designing, Coding, Debugging, Testing , documentation.
Analyzing the problem:
In this step we focus about the system that who is going to use it and how will they use. Business requirements are gathered.
In this phase the software is prepared according to the previous phase. System design helps in specifying system requirements and also helps defining system architecture.
After designing the system, the work is divided into several modules and coding started. It is the longest phase of the SDLC.
It is the process of identifying and eliminating the errors. In this phase errors are removed from the system.
After the code is developed , it is tested to make sure that the product is actually solving the needs addressed and gathered during the requirements phase. All types of testing like Functional testing and Non-functional testing are also done.
It is important phase in SDLC, the presence of documentation helps to track the application and quality of software product. It makes information easily accessible, provide number of user entry point, helps new user to learn quickly.
Once the customer starts using the developed system then the actual problem comes and needs to be solved from time to time. This process where the care is taken for the developed products is known as maintenance.
3. Syntax Error and Logical Error
Syntax error occurs when there is a violation in any of the rules of language formation. A language translator will identify the syntax error automatically. It waste the computer memory and programmer’s time.
Logical error are mistakes that cause the program to run in unexpected or incorrect ways. These errors must be found and corrected by the programmers. It is time consuming and difficult job.
4. Machine Language. Advantages and Disadvantages.
Machine Language is the first generation language in which instructions and data are expressed as a series of 0’s and 1’s.
- Efficiency during execution, as this is the only language which the computer can understand and follows.
- The program becomes very lengthy and very difficult to locate the errors.
5. Assembly Language. Advantages and Disadvantages
It is low level language that permits the use of MNEMONICS codes for each instruction that the machine can do.
- The computation time of an assembly language program is less.
- Debugging the program is much easier.
- It is machine dependent , i.e. each machine has different assembly language.
- It is difficult to understand.
6. Features of High Level Programming Language
- Independent program and problem oriented.
- Detailed knowledge is not required.
- No time consuming.
- Better documentation.
7. Source Program and Object Program
A program written by the programmer in an assembly language is called Source Program.
Program which is obtained after being converted into machine language is called object program.
8. Compiler and Interpreter
A compiler translates a whole program at once into machine language and then it can be immediately executed at any time.
An interpreter converts a source code into machine code one line at a time and executed line of a program after it is translated.