November 27, 2021


A Blog For Tech Enthusiasts

[#11] – Computer Languages – Questions

6 min read

Language is a means of communication. We use a natural language such as English, to communicate our ideas and emotions to others. Similarly, a programmer uses a computer language to instruct a computer what he/she wants it to do.

All natural languages use a standard set of words and symbols for communication. Everyone using that language understands these words and symbols. The set of words allowed in a language is called its vocabulary. For example, the words used in English form the vocabulary of English language. Each word has a definite meaning that can be looked up in a dictionary.

Similarly, every computer language has a vocabulary of its own. Each word in the vocabulary has a definite unambiguous meaning that can be looked up in the manual of that language. The main difference between a natural language and a computer language is that natural languages have a large vocabulary but most computer languages use a very limited or restricted vocabulary.

Also Read:

Points To Remember:

  • A language acceptable to a computer system is called computer language or programming language, and the process of writing instructions in such a language for an already planned program is called programming or coding.
  • All computer languages can be classified broadly into three categories, namely; machine language, assembly language, high-level language.
  • A programming language that a computer understands without using a translation program is called its machine language. it is normally written as strings of binary 1s and 0s.
  • A language that allows instructions and storage locations to be represented by letters and symbols instead of numbers is called assembly language or symbolic language. A program written in an assembly language program or symbolic program.
  • Assembler is a translator program that translates (converts) an assembly language program (source program) into its equivalent machine language program (object program).
  • Machine and assembly languages are often referred to as low-level programming languages because they are machine dependent, they require the programmers to have a good knowledge of the internal structure of the computer being used, and they deal with machine-level coding requiring one instruction to be written for each machine-level operation. High-level programming languages overcome these limitations of low-level programming languages.
  • Compiler is a translator program that translates (converts) a high-level language program (source program) into its equivalent machine-language program (object program).
  • Linker is a software tool that takes multiple object program files (modules) of any software and fits them together to assemble them into the program’s final executable form, sometimes called load module.
  • Interpreter is a translator program that translates (converts) a high-level language program into its equivalent machine-language program. However, unlike a compiler that merely translates an entire source program into an object program and is not involved in its execution, an interpreter takes one statement of the source program, translates it into machine language instructions, and then executes the resulting machine language instructions immediately before taking the next statement for translation. The interpreter does not generate any object code of the source program.
  • Object-oriented programming (OOP) deals with solving a problem by identifying the real-world objects of the problem and the processing required of those objects, and then creating simulations of those objects, their processes, and the required communications between the objects.
  • Today many different high-level languages are in use because each one was designed for a different purpose. Some of these are FORTRAN, COBOL, BASIC, Pascal, C, C++, C#, Java, RPG, LISP, and SNOBOL.
  • Several characteristics believed to be important for making a programming language good are- simplicity, naturalness, abstraction, efficiency, structured programming support, compactness, locality, extensibility, and suitability to its environment.
  • The factors that generally influence the process of selecting a programming language out of the many options available for coding an application are- nature of the application, familiarity with the language, ease of learning the language, availability of program development tools, execution efficiency, and features of a good programming language.
  • A subprogram is a program written in a manner that it can be brought into use in other programs and used whenever needed without rewriting. Other names used for it are subroutine, subprocedure, and function.

List of Questions:

  1. What is a programming language? Why it is so called?
  2. What is program coding?
  3. Discuss the analogy between a computer language and a natural language.
  4. How does a computer language differ from a natural language?
  5. What is syntax rules of a programming language?
  6. Name the three categories of computer languages in order of their ease of usage.
  7. What is a machine language? Why it is required?
  8. What are the advantages and limitations of machine language?
  9. When do we call a computer language machine dependent? What is the main disadvantage of such a language?
  10. A machine language instruction has two-part format. Identify these parts and discuss the function of each.
  11. What is a mnemonic? How it is helpful in case of computer languages?
  12. What is an assembly language? What are its advantages over machine language?
  13. What is an assembler?
  14. What is the difference between a source program and an object program?
  15. What is a macro instruction? How does it help in making a programmer’s job easier?
  16. Why machine and assembly languages are often referred to as low-level languages?
  17. List the main characteristic features of high-level languages. Name five high-level languages?
  18. Why high-level languages are easier to learn and use?
  19. What is a compiler? Why it is required? A computer supports five high-level languages. How many compilers will this computer have?
  20. It is said that an assembly language is “one-for-one”, but a high-level language is “many-for-one”. Explain what this means.
  21. Illustrate the machine independence characteristic of a high-level language.
  22. Differentiate between syntax errors and logic errors found in computer programs. Which type of error is more difficult to detect and correct? Write reasons for your answer.
  23. While writing a program, a programmer erroneously instructed the computer to calculate the area of a rectangle by adding the width to its length (that is, AREA = LENGTH + WIDTH) instead of multiplying the length and width. Would you expect the language processor to detect this error? Explain Why.
  24. A programmer eliminates all language processor errors from a program, and then runs it to get printed results. The programmer, therefore, concludes that the program is complete. Comment.
  25. What type of errors in a program a compiler can detect? What type of errors in a program a compiler cannot detect?
  26. What is a linker? Why it is required?
  27. Explain the difference among assembler, compiler, interpreter, and linker.
  28. What is an interpreter? How does it differ from a compiler?
  29. What advantages do compilers have over interpreters?
  30. What advantages do interpreters have over compilers?
  31. When would you prefer to use an interpreter than a compiler?
  32. When would you prefer to use a compiler than an interpreter?
  33. What are the advantages and limitations of high-level languages as compared to machine and assembly languages?
  34. What is object-oriented programming?
  35. What are comment statements? Why they are used in a program? How they are treated by a language processor?
  36. Briefly describe the development and use of following programming languages:
  37. What is standardization of a language? Why it is important?
  38. Name the four divisions of a COBOL program. What is the purpose of each division?
  39. What is a self-documenting language? Illustrate with an example.
  40. Why COBOL is often referred to as self-documenting language?
  41. The main drawback of COBOL is that it is a verbose language. How has this drawback been largely taken care of now?
  42. List some program preparation techniques often included under the term “structured programming”.
  43. In Java the compiled code is machine independent. Explain how this is achieved.
  44. List the main differentiating features of C++ and Java.
  45. What characteristics are desirable for a good programming language?
  46. What factors generally influence the process of selecting a programming language out of the many options available for coding an application?
  47. Would you be equally likely to choose FORTRAN or COBOL for programming a given problem? Why?
  48. What is a subprogram? How do subprograms help in program writing?
  49. What is a built-in function? Write few examples of built-in-fuctions.
  50. Illustrate with an example the flow of control in case of subprogram calls.
  51. Give the full form of following:

Leave a Reply

Your email address will not be published. Required fields are marked *