What are logical errors and how does it differ from syntax errors?

1 Answer

Answer :

Program that contains logical errors tend to pass the compilation process, but the resulting output may not be the expected one. This happens when a wrong formula was inserted into the code, or a wrong sequence of commands was performed. Syntax errors, on the other hand, deal with incorrect commands that are misspelled or not recognized by the compiler.

Related questions

Description : The errors that can be pointed out by the compiler are 1) Syntax error 2) Symantic error 3) Logical error 4) Internal error

Last Answer : 1) Syntax error

Description : which type of errors are detected by the assembler: a. syntax error b. logical error 9 run time error a none of these

Last Answer : a. syntax error

Description : What type of errors are not detected by assemblers: a. Syntax error b. Runtime error c. Logical error

Last Answer : c. Logical error

Description : A _____ contains specific rules and words that express the logical steps of an algorithm. 1) Syntax 2) Programming structure 3) Programming language 4) Logic chart 5) None of these

Last Answer : Answer :3

Description : A mistake in an algorithm that causes incorrect results is called: a) Logical Error b) Syntax Error c) Procedural Error d) None of These

Last Answer : a) Logical Error

Description : A ______ contains specific rules and words t hat express the logical steps of an algorithm a) Programming language b) Syntax error c) Programming structure d) Logic chart e) None of these

Last Answer : a) Programming language

Description : A mistake in an algorithm that causes incorrect results is called a a) logical error b) syntax error c) procedural error d) compiler error e) None of these

Last Answer : b) syntax error

Description : A ...... contains specific rules and words that express the logical steps of an algorithm. 1) Programming Language 2) Programming Structure 3) Syntax 4) Logic chart

Last Answer : 3) Syntax

Description : Process of removing errors called a) Error Free b) Debug c) Syntax Error d) Exception

Last Answer : b) Debug

Description : What are the stages in the compilation process? A) Feasibility study, system design and testing B) Implementation and documentation C) Lexical Analysis, syntax analysis, and code generation D) None of the above

Last Answer : Answer : C

Description : When an algorithm is written in the form of a programming language, it becomes a _________ a) Flowchart b) Program c) Pseudo code d) Syntax

Last Answer : Answer: b Explanation: An algorithm becomes a program when it is written in the form of a programming language. Thus, any program is an algorithm

Description : Which of the following is incorrect? Algorithms can be represented: a) as pseudo codes b) as syntax c) as programs d) as flowcharts

Last Answer : Answer: b Explanation: Representation of algorithms: -As programs -As flowcharts -As pseudo codes

Description : The word ____________comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi. a) Flowchart b) Flow c) Algorithm d) Syntax

Last Answer : Answer: c Explanation: The word algorithm comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi

Description : The rules that give meaning to the instructions. a) Semantics b) Syntax c) Code d) Cases

Last Answer : Answer: a Explanation: The answer is semantics. They are the rules that give meaning to the instructions. Syntax is the formal rules that ensure validation of code

Description : The formal grammar rules governing the construction of valid instruction. a) test case b) syntax c) program d) semantics

Last Answer : Answer: b Explanation: Syntax determines the grammatical rules in a code. Semantics give meaning to the instructions

Description : What is syntax error?

Last Answer : Syntax errors are associated with mistakes in the use of a programming language. It maybe a command that was misspelled or a command that must was entered in lowercase mode but was instead entered with an ... symbol, or lack of symbol, somewhere within a line of code can also lead to syntax error.

Description : ______provides a powerful and natural mechanism for organizing and structuring your software. It also explains how classes inherit state and behavior from their super classes and explains how to derive one class ... the java programming language: a) Object b) Inheritance c) Class d) None of These

Last Answer : b) Inheritance

Description : In May 1997 an IBM super computer called ______defeated world chess champion Gary Kasparov in a chess match: a) Syntax Blue b) Deep Blue c) Blue Stan d) None of These

Last Answer : b) Deep Blue

Description : ..... is a set of Keywords, s symbols, and a system of rules for constructing statements by which humans can communicate the instructions to be executed by a computer... 1) A Computer Program 2) A Programming Language 3) An Assembler 4) Syntax

Last Answer : 2) A Programming Language

Description : Virtual constructor: Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error. Does c++ support multilevel and multiple inheritance?

Last Answer : Yes.

Description : Pick the one that is used for logical operations or comparisons such as less than equal to or greater than. A) Arithmetic and Logic Unit B) Control Unit C) Both of above D) None of above

Last Answer : Answer : A

Description : The first machine to successfully perform a long series of arithmetic and logical operations was: A) ENIAC B) Mark-I C) Analytic Engine D) UNIVAC-1

Last Answer : Answer : B

Description : What is the responsibility of the logical unit in the CPU of a computer? A) To produce result B) To compare numbers C) To control flow of information D) To do math’s works

Last Answer : Answer : B

Description : The arranging of data in a logical sequence is called A) Sorting B) Classifying C) Reproducing D) Summarizing

Last Answer : Answer : A

Description : The basic operations performed by a computer are A) Arithmetic operation B) Logical operation C) Storage and relative D) All the above

Last Answer : Answer : D

Description : The computer performs all mathematical and logical operations inside its _______ A. Visual Display Unit B. Memory Unit C. Output Unit D. Central Processing Unit

Last Answer : D. Central Processing Unit

Description : Which of the following characters is correct regarding network topologies: a) Network Topologies describe the ways in which the elements of a network are mapped. b) Network Topologies describe the physical and logical arrangement of the network nodes. c) Both of Above d) None of These

Last Answer : c) Both of Above

Description : The main function of the ALU is: a) Store Data and Information for Future Use b) Perform arithmetic and logical operations c) Control Computer Output, such as Printing d) None of These

Last Answer : b) Perform arithmetic and logical operations

Description : The basic operation performed by a computer are: a) Arithmatic Operator b) Logical c) Storation d) All of above e) None of These

Last Answer : d) All of above

Description : A ____ is a namespace for organizing classes and interfaces in a logical manner. Placing your code into ______makes large software projects easier to manage. This section explains why this is useful and ... provided by the Java Platform: a) Inheritance b) Object c) Package d) None of These

Last Answer : c) Package

Description : Which among the following definitions are correct: a) Object - Any entity that has state and behavior is known as an object. b) Class - Collection of objects is called class. It is logical entity. c) ... re-usability and is used to achieve run time polymorphism. d) All of the above e) None of These

Last Answer : d) All of the above

Description : The main function of the ALU is to a) perform arithmetic and logical operations b) store data and information for future use c) control computer output, such as printing d) monitor all computer activities e) None of these

Last Answer : a) perform arithmetic and logical operations

Description : The basic operations performed by a computers are- 1) Arithmetic Operation 2) Logical Opertaion 3) Storage and Relative 4) All the above

Last Answer : 4) All the above

Description : The basic operations performed by a computers are 1 Arithmetic Operation 2 Logical Opertaion 3 Storage and Relative 4 All the above

Last Answer : 4 All the above

Description : Which of the following is the logical topology? A) Bus B) Tree C) Star D) Both A and B

Last Answer : C) Star

Description : Which is the first AI program? a) The Logical Brain b) AlphaSense c) The Jarvis d) The Logic Theorist

Last Answer : d) The Logic Theorist

Description : Which is the first AI program? a) The Logical Brain b) AlphaSense c) The Jarvis d) The Logic Theorist

Last Answer : d) The Logic Theorist

Description : A digital investigator pursuing a line of investigation in a case because that line of Investigation proved successful in two previous cases is an example of: a. Logical reasoning b. Common sense c. Preconceived theory d. Investigator’s intuition

Last Answer : c. Preconceived theory

Description : .Which one is used for compute the logical inference algorithm? a. Validity b.Satisfiability c. Logical equivalence d.All of these

Last Answer : d.All of these

Description : C. P. U. consists of (1) Arithmetic and Logical unit and Register (2) Arithmetic and Logical unit, Register and Control unit (3) System unit and Memory (4) Hard disk and Control unit

Last Answer : Arithmetic and Logical unit, Register and Control unit

Description : The process of arranging data in logical sequence is called (1) Classifying (2) Reproducing (3) Summarizing (4) Sorting

Last Answer : Sorting

Description : Which of the following is not a logical operator ? (1) ADD (2) AND (3) NOT (4) OR

Last Answer : ADD

Description : _____is the process of finding errors in software code. 1) Compiling 2) Testing 3) Running 4) Debugging 6 5) None of these

Last Answer : Answer :4

Description : The primary advantage of key-to-tape data entry system is A) A large percentage of editing can be performed at the time of data entry B) Key verification is easily performed C) The tape is reusable D) Keying errors can be detected as they occur.

Last Answer : Answer : C

Description : Which statement is valid about computer program? A) High level languages must be converted into machine language to execute B) High level language programs are more efficient and faster to execute C) It ... to identify errors in high level language program than in low level programs D) All of above

Last Answer : Answer : A

Description : In MS Word, which checks active document for spelling and grammatical errors is: a) Spell Corrector b) Spell Checker c) Spell Improver d) None of These

Last Answer : b) Spell Checker

Description : The ________is a network layer Internet protocol that provides message packets to report errors and other information regarding IP packet processing back to the source: a) Internet Control Message ... Standard Flexible Message Protocol c) Internet Dynamic Chartered Message Protocol d) None of These

Last Answer : a) Internet Control Message Protocol

Description : Errors in computer programs are called: a) Hubs b) Bugs c) Syntex Error d) None of these

Last Answer : b) Bugs

Description : Errors in a software program are referred to as: a) Viruses b) Bugs c) Computer Fault d) None of These

Last Answer : b) Bugs

Description : Errors in computer results could be due to 1) encoding of data 2) transmission of data 3) manipulation of data 4) all of the above

Last Answer : 4) all of the above