Computer Fundamentals Index

Computer Introduction Types of computer Characteristics of computer Uses of computer History of Computers

Computer Languages

Low Level language Middle level Language High level language

Computer Generation

Generation of Computers Second generation of Computers Third generation of Computers Fourth generation of Computers Fifth generation of Computers

Peripheral Devices

Input devices Output device


Block diagram and basic components Control processing unit (CPU) Software Hardware


Computer Memory Registers Memory Hierarchy RAM Vs ROM Understanding file sizes (Bytes, KB, MB, GB, TB, PB, EB, ZB, YB)

Computer Network

Types of Network Types of Area Networks (LAN, WAN, MAN) TCP Flags

Computer Virus

Computer Virus

Computer Ports

Computer Ports


How to hack a computer How much do Computer Programmers make How does a Computer work How to associate a file with a program How does a computer convert text into binary How does a computer process data into information How to fix a CD-ROM DVD How to fix the no input signal How to install computer memory How to associate a file with a program How to log out of your operating system How do I change my name on Google How to installation or uninstallation Microsoft Paint How to fix a not a valid Win32 application error How to fix missing Microsoft Windows .dll files How to use a computer keyboard How to erase my hard drive and start over How can I test how many words I can write a minute How to shut down a computer How do I open and edit the Windows registry How to edit the registry from the command line How to restart Microsoft Windows How to install a computer processor How to open Microsoft Paint How to fix problems in Windows after installing new software How to enable or disable the preview pane of Microsoft Outlook How to open a Microsoft .wps or Works file in Word How to view the HTML source code in Microsoft Word How to View or Change the Screen Resolution of a Monitor How to Connect and Install a Computer Keyboard How to Delete Temporary Files in Windows 10 How to determine Which Version of Microsoft Office I'm using How to find out how much hard drive space is available How to Fix PC Stuck on Verifying DMI Pool Data How to choose which items show in the notification area How to find similar images using Search by Image How to fix Low Memory and out of memory errors How To Replace the CMOS Battery How do I Update my Antivirus Program How to fix a general protection fault How to Identify problems in the Windows Device Manager How can the Base be Shown How to test if a Website or Web Page is down How Much is 1 Byte, Kilobyte, Megabyte, Gigabyte, etc


Who invented Computer What are the advantages of the Internet? What are the disadvantages of the Internet? Is my computer 64 bit? What is Edge Computing? What is a Router? What is Monitor What is Printer What is a Web Browser What is Microphone What is a Webcam What is PC What is Keyboard What is Motherboard What is WAP What is URL What is a Digital Assistant When was the first Computer Invented What is Modem What is Firmware What is Imperative Programming What is Protocol What is Safe Mode What is Device Driver What is Hybrid Topology What is Mesh Topology What is Procedural language What is a hyperlink What is a Username Who invented the Internet What is Video Card What is Sound Card What is Binary What does Alt+B do What does Alt+D do What does Alt+E do What does Alt+Esc do What does Alt+R do What does ALT + Q do What does Alt + Tab do What is Data Manipulation What is a touch screen What is Back Panel What is Analog Monitor What is AR lens What is an ATX Style Connector What is a File System What is Hard Disk Drive (HDD) What is a boot device What is accessibility What is Line In What is network Interface card (NIC) What is Optical Disk Where can I ask questions on the internet What is Auto Rotate What is CAD (Computer-aided design) What is Cable Modem What is Home Page What is boot menu What is braille reader What is flash memory What is Windows What is Clipboard What is Cyber Warfare What is Myspace Why has my IP address changed What is Jacquard Loom My computer is running slow, what steps can I do to fix it What is a Kensington Lock What is a multicore processor What is automation Are smartphones and tablets computers What is a Login Script What is a Loosely Typed Language What is Multitasking? Why my computer monitor shows no display or black screen What is REM What is Parallelization What is Overtype mode What is open with What is Bracket What is an Online Service What is REM What is Parallelization What is Overtype mode What is open with What is Bracket What is an Online Service What is the Pg Dn Key (Page Down Key) What is the Pg up Key (Page up Key) What is Palmtop Computer What is a Processing Device What is a Print Preview What is the Print Screen Key What can I do if my computer or laptop is lost or stolen What is a Model Number What are the currently available antivirus programs What are Toggle keys What is a Case fan What is a Silicon Chip What is a Slate PC What is a TAB stop What is an Octothorpe What is Task Pane What is Task View What is the svchost.exe file used for in Windows Where can I find free online virus scanners Why am I unable to increase the resolution in Windows What is Autofill When I click my mouse, it sometimes double-clicks What is Scratch What is UDIMM What is MsConfig What is an Expansion Card What is an Executable File What is an Elevated Command Prompt What is an AC Adapter What is AIMBOT What is a Software Suite What is a LED Monitor What does Alt + X do What does alt + space do What does Alt + O do Now that I’ve got a Computer, what can i do What is a Punch Card What is RDIMM What is Select All What is Serial number What is Thermos flask What programs can I use for speech recognition What are the Advantages of Computers What are the Disadvantages of Computers What does Alt + T do What Hardware Device Drivers should be Updated What is a Desktop What is a Ring Topology What is CMOS What is a Directory What is a Mechanical Mouse What is a Plotter What is a Variable What is an Icon What is Data What is HDMI What is Remote What is Right-Click What is SMPS Why does my Laptop not turn on What is a Copyright What is a Cordless Mouse What is a CSV file What is a Joystick What is a Start Button What is a Taskbar What is an Alignment What is an Output Device What is Cat 5 What is Google Chrome What is Post


Difference between hardware and software Difference between multiprocessor and distributed systems Difference between Desktop and Laptop Difference between File and folder Difference between Hard Copy and Soft Copy Open Source Programs vs Closed Source Programs


Quantum Computing Computer Software Autoexec.bat and config.sys info Update an Antivirus Use of Internet Advantages and disadvantages of Email Computing Power Internet Explorer Shortcut Keys Advanced Encryption Standard (AES) Augmented Reality Infrastructure Readiness Check Top 10 Internet tips and tricks Introduction and Features of FoxPro Features of Multimedia Top 10 online services and applications Receiving S.M.A.R.T. status bad backup and replacing error Version Control System Uninstalling Software or Apps in Windows Data Warehouse Increase or decrease font size in Word using keyboard shortcuts Mouse not detected or working in Windows Computer Cleaning Information and Steps Function Keys on Keyboard Windows 7 Alt+Tab won’t stay on top or stick

What is Imperative Programming?

Imperative Programming is an approach to be used in the development of applications. It is different from any other technique as it focuses on the steps capable of performing any change in the current state of the software. The approach involves using statements that can change the state of the program.

What is Imperative Programming

Another requisite of this tactic is that the developer needs to code from scratch to end while solving a problem, which means it is impossible to use any existing modules. This is also different from declarative programming because it concentrates on how the program should accomplish the operation, while declarative programming's primary focus is what will be the functions of the program.

It is similar to natural language; the commands in imperative programming are shown as imperative mood. An imperative program constitutes multiple such commands that provide instruction to the system about how the actions are to be performed. The commands from the Central Programming Unit itself are imperative.

In imperative programming, all the commands are first converted into binary equivalent. The computer directly understands the binary code and is more efficient in running. The aim behind introducing this approach was to develop a method to develop software that is easier to understand by humans. The code in the imperative program can be broken into several blocks, which makes it easier to comprehend. Some programming languages that implement this approach are C++, Java, and C#.

The idea of dividing a larger code into smaller parts or blocks was executed in the ALGOL programming language in the 1950s for the first time. Later these smaller executable blocks came to be known as compound statements. But nowadays, we call them procedures instead of compound statements. The procedure may be a single command or can constitute multiple imperative commands, but once the block is established, the whole procedure is used as a single imperative statement.

This allows the developer to be abstract the control flow of the program. It makes it more natural to implement the various concepts of programming in this method as compared to any other approach. It provides a higher level of data abstraction than provided in declarative programming.

How is Imperative Programming different from Declarative Programming?

What is Imperative Programming
  • In declarative programming, the developer is required to define the entire problem; instead, in imperative programming, the developer must focus on stating various issues that will be solved. When using the declarative programming approach, there is no restriction on the steps or methods used to solve the problem, but the approach ensures that the solution is correct. This approach is also called the model-based programming approach. This is called so because the languages that implement this approach instruct a strict method to solve the problem at hand using various models. The programming languages that fall under the category of declarative programming are HTML, CSS, SQL, and various other logical or domain-specific languages.

Let us discuss a real-life scenario to better understand the difference between imperative and declarative programming approaches.

  • Consider an example of delivering a courier, and the declarative programming is similar to the address on the package. It will declare the exact location you are required to send the package. Still, the imperative programming is like your navigator that will provide you with step-by-step instructions to arrive at your destinations. The models used for the functioning of declarative programming are constructed from the imperative programming.
  • The developer uses numerous mutable variables to implement the solution, which has caused a lot of issues. At the same time, in declarative programming, there is no need to use mutable variables, which means there are no issues. In the imperative approach, the decision-making power lies in the hand of the developer, while in declarative programming, the decisions and the commands are given by the compiler.
  • When developing an application using low-level programming languages, the developer prefers to have maximum control over the language; full control is provided to the developer in imperative programming.
  • While declarative programming can make the code more understandable, this approach also allows for automating the repetitive process. This is usually preferable among beginners.
  • Procedural programming is an example where the imperative approach is followed. In the approach, there are various limitations because of the stepwise implementation and singular flow of the code. This makes it difficult to extend the usability and low room for abstraction. While in the declarative approach, numerous features are advantageous to the developer. It provides a higher level of abstraction, and the entities are used as objects. The programs can easily be extended and can also implement parallel processing. All object-oriented programming falls under the declarative programming approach. Some examples of programming languages are C, C++, Java, Python, Basic, PHP, MATLAB, Ruby, and many more.

Advantages and Disadvantages of implementing Imperative Programming

  1. Though imperative programming is a primitive technique, various programming languages still implement this approach. And this is the actual form of the programming. Therefore, more certain features are provided in the imperative programming, which makes it more suitable than existing models.
  2. The imperative programming approach is simpler to implement comparing with another programming approach, and it is easier to learn because of its simpler step-by-step implementation. Most programmers begin their programming journey by learning an imperative language first. When working on a routine task, the solution should be as clear as possible. Moreover, any change should take little or very low effort in such a situation. It is always better that multiple people can maintain or change the application. The process of maintenance and optimizations should not be limited to only one person. It is most suitable for solving small problems, but the problem that arises when solving complex problems lies behind the size of the code. The line of the code increases drastically when the user solves complex problems. The size of the code increases, but it is still more understandable.
  3. The execution itself is declarative, making it harder to differentiate the execution from the programming. Due to this, there is a strong possibility of an error that can be caused due to the constant interventions. If the program's code is fully based on an imperative approach, then it is very difficult to implement extensions. At the same time, in the declarative approach, the code is divided into blocks, so it is easy to add extensions separately.
The biggest advantage of imperative programming is that the code is easily understandable.If the problem is complex, the size of the code increases drastically.
The language is easier to learn for beginners.There is always a possibility of errors due to subsequent access to the code.
The whole control is with the developer, so certain characteristics of the application can be taken into account.It is difficult to extend the application due to the rigid nature of the code.