Machine language, the first generation of programming languages, is written using:
- A.English words
- B.Mnemonics such as ADD and MOV
- C.The binary digits 0 and 1
- D.Query statements
Correct answer
Explanation
The correct answer is C, the binary digits 0 and 1. Machine language is the only language the processor understands directly, because each instruction is a pattern of electrical states that is written as a string of zeros and ones; a program in machine language therefore needs no translation and runs fastest, but it is tied to one processor and is very hard for a person to write or correct. Option A is wrong because English-like statements belong to the high-level languages of the third generation, such as COBOL, C and Java. Option B is wrong because mnemonics such as ADD, SUB and MOV belong to assembly language, the second generation, which needs an assembler to be converted into machine code. Option D is wrong because query statements belong to the fourth generation, of which SQL is the standard example and in which the programmer says what is wanted rather than how to get it. Machine and assembly language together form the low-level group.
Read the full article: Programming Languages: Generations, Compilers and PYQs
Practice Questions
View allWhich of the following is considered the first high-level programming language?
- A.COBOL
- B.FORTRAN
- C.BASIC
- D.Pascal
Show answer
Its name is short for Formula Translation, it was developed by a team under John Backus at IBM and released in 1957, and it was the first language in which a programmer could write ordinary algebraic formulas instead of machine codes, which is why it is counted as the first…
Read the full explanation →The C programming language was developed by:
- A.James Gosling
- B.Bjarne Stroustrup
- C.Dennis Ritchie
- D.Guido van Rossum
Show answer
He created C at Bell Laboratories in the early 1970s and used it to rewrite the UNIX operating system, which is why C is called the mother of system programming languages and still underlies most operating systems.
Read the full explanation →What is the use of the 'javac' command?
- A.Execute a java program
- B.Debug a java program
- C.Interpret a java program
- D.Compile a java program
Show answer
The command javac is the Java compiler: it takes a source file with the extension.java, checks its grammar and converts it into a class file containing bytecode, the intermediate code that any Java Virtual Machine can run.
Read the full explanation →Which translator converts a high-level program into machine language one statement at a time?
- A.Compiler
- B.Interpreter
- C.Assembler
- D.Loader
Show answer
An interpreter reads one statement of the source program, translates it and executes it immediately before moving to the next, so it stops at the first error it meets and tells the programmer about that error alone; this makes it convenient for learning and for testing small pieces of code…
Read the full explanation →Which of the following is NOT a java primitive type?
- A.short
- B.long
- C.long double
- D.boolean
Show answer
Java has exactly eight primitive data types, namely byte, short, int, long, float, double, char and boolean, and long double is not among them; it belongs to C and C++, where it denotes an extended precision floating point number, so the option is a deliberate trap for candidates who have…
Read the full explanation →