🔥 Burn Fat Fast. Discover How! 💪

Top Programming Interview Questions and Answers (General) Que | Coding interview preparation

Top Programming Interview Questions and Answers (General)

Question: Please explain what you understand by computer programming.
Answer:
Also known as coding or programming, computer programming is the process of encoding an algorithm into a notation, typically a computer program, by means of some programming language so that it can be executed by a computer.

Each programming language contains a set of instructions for the computer to execute a set of tasks. Programming is a complex process that includes designing an algorithm, coding the same in a programming language, debugging a program, maintaining, and updating the code.

Question: Can you enumerate and explain the various types of errors that can occur during the execution of a computer program?
Answer
: Three types of errors can occur during the execution of a computer program. These are:

Logical errors – This occurs in the scenario of a computer program implementing the wrong logic. As there is no report generated for these types of programming errors, they are the most difficult ones to deal with.
Runtime errors – Occurs when the program contains an illegal operation. For example, dividing a number by 0. These are the only errors that are displayed instantly during the program execution. Upon the occurrence of a runtime error, the program execution is stopped and a diagnostic message is displayed.
Syntax errors – Occurs when one or more grammatical rules of the programming language being used is violated. Such errors are detected during compile time.

Question: Please explain an algorithm. What are some of its important features?
Answer
: An algorithm can be defined as a set of finite steps that when followed helps in accomplishing a particular task. Important features of an algorithm are clarity, efficiency, and finiteness.

Question: What do you understand by maintaining and updating a computer program?
Answer
: The maintenance and updating process of a computer program starts post its successful installation. While program maintenance is the continuous process of monitoring the computer program for bugs and errors, updating the computer program means making it better with minor and major changes over time.

Question: Please provide a brief explanation on variables.
Answer
: Variables are used for storing the input of a program as well as the computational results during program execution. These are actually named memory locations. The value stored in a variable can change during the program execution.

Source: Vijay Singh