What type of errors are not detected by assembler?
Logical Error
An assembler is a tool used in programming that translates assembly language code into machine code (executable code). Its primary function is to check the code for correctness in terms of syntax and structure according to the rules of the specific assembly language.
Programming errors can generally be categorized in several ways. Understanding these categories helps in diagnosing issues within software.
Syntax errors are mistakes in the code that violate the grammatical rules of the programming language. These are like spelling or punctuation errors in human language. The assembler is designed to detect these errors because they prevent the code from being translated into machine code correctly. For example, using an incorrect instruction mnemonic or providing the wrong type of operand for an instruction would result in a syntax error.
Run-time errors occur during the execution of the program. These errors happen when the program is running and encounters an unexpected situation, such as trying to divide by zero, accessing an invalid memory address, or running out of memory. These errors are not related to the structure of the code itself but rather to the conditions under which it is executed. Assemblers cannot detect run-time errors because they occur after the assembly process is complete, during the program's execution phase.
Logical errors are flaws in the program's design or algorithm. The code is syntactically correct and can be assembled and even run, but it does not produce the intended or correct results. This happens when the programmer's logic about how the program should solve a problem is flawed. For instance, a program might be designed to calculate the average of numbers but mistakenly sums them instead, or uses an incorrect formula. The assembler has no way of understanding the programmer's intent or the desired outcome, so it cannot identify that the logic itself is incorrect. These errors manifest as incorrect output or unexpected behavior during execution.
Based on the types of errors:
Since the assembler's job is to translate code based on predefined rules, it can catch violations of those rules (syntax errors). However, it cannot understand the underlying logic or guarantee the correctness of the program's output. Therefore, logical errors, which represent flaws in the programmer's reasoning, are not detected by the assembler.
A mechanism for arranging controlled access to a shared resource, like a file, is called:
Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?
In Linux operating system environment ________ command is used to print a file.
Consider the following statements :
(a) UNIX provides three types of permissions
Read
Write
Execute
(b) UNIX provides three sets of permissions
permission for owner
permission for group
permission for others
Which of the above statement/s is/are true ?
Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.
Windows | UNIX |
A. Create-process( ) | I. Open( ) |
B. WaitForSingleObject( ) | II. Close( ) |
C. CreateFile( ) | III. Fork( ) |
D. CloseHandle( ) | IV. Wait( ) |