FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Sebastian has created a program that calculates shipping cost. For every pound of product, the customer should be charged $1.00. When he tests the program with a product that weighs 5 pounds, the shipping cost is calculated to $20. What type of error has occurred that produces the unexpected results?
A
Logic
B
Syntax
C
Runtime
D
Validator
Explanation: 

Detailed explanation-1: -Definition: Debugging is the process of detecting and removing of existing and potential errors (also called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash. To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or defects.

Detailed explanation-2: -Code tracing is a method in which the programmer uses paper and pencil to hand trace the execution of a program or code segment in order to track the variable values as they change during execution and to determine the output of the code.

Detailed explanation-3: -1. Integer Data Type. An integer type variable can store zero, positive, and negative values without any decimal. In C language, the integer data type is represented by the ‘int’ keyword, and it can be both signed or unsigned.

Detailed explanation-4: -Sequence is the default control structure; instructions are executed one after another.

There is 1 question to complete.