NEW
Font size
WorksheetsICPTP L1: Programming Languages
Total questions: 10
Worksheet time: 10mins
What is the main function of a compiler?
Translates assembly language into machine code.
Translates high level language into object code.
Translates high level language into machine code.
Translates machine code into high level language.
Which of the following is a syntax error?
Misspelling a statement.
Writing a program that tries to access an array out of bounds.
Using logical operators incorrectly.
Unintentionally using the same variable name at different points.
What is the purpose of a translator in programming languages?
Checks for syntax errors in a program.
Writes an equivalent machine language program.
Analyzes and fixes logical errors.
Identifies and fixes runtime errors.
Which generation of languages is based on solving problems using constraints given to the program?
Fifth
Second
First
Third
What is the main difference between an interpreter and a compiler?
Interpreters create object code for later use, while compilers execute the code immediately.
Interpreters generate error reports after translation, while compilers notify errors and stop further scanning.
Interpreters translate the entire code at once, while compilers translate one statement at a time.
Interpreters take less time to analyze the source code, while compilers take more time.
Which of the following is a logical error?
Division by zero
Syntax error in the code
Incorrectly using logical operators
Trying to access an array out of bounds
What is the purpose of debugging in programming?
Identifying, analyzing, and fixing errors in the code.
Translating high level language into machine code.
Creating object code for later use.
Checking for syntax errors in the program.
Which generation of languages is hardware dependent and easy to understand and execute?
First
Second
Fourth
Third
What is the main function of an assembler?
Translates assembly language into machine code.
Translates high level language into machine code.
Translates machine code into high level language.
Translates high level language into object code.
Which type of language concentrates on what to do rather than how to do it?
Procedural Languages
Non-Procedural Languages
Query Languages
Artificial Languages
