Docsity

Cloud Computing Lab Manual Practical Journal Assignment 3 SPPU TE AIDS 2024 Pattern, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
Laboratory Assignment No. 4
Title: Install a C Compiler in the Virtual Machine and Execute a Simple Program
Problem Statement: Install a C compiler in the virtual machine created using VirtualBox and execute a simple C
program.
Aim: To install a C compiler in a virtual machine and execute a simple C program.
Objectives:
• To understand the concept of a virtual machine.
• To install a C compiler in the virtual machine.
• To write and execute a simple C program.
• To understand the basic compilation and execution process.
• To verify the successful installation of the C compiler.
Software Requirements: Windows 10/11 Operating System, Oracle VirtualBox, Windows Virtual Machine,
Code::Blocks IDE with MinGW Compiler, Microsoft Word (for documentation)
Hardware Requirements: Computer or Laptop, Minimum 4 GB RAM, Intel Core i3 Processor or above, At least
20 GB Free Disk Space
Theory:
C Compiler
A C compiler is a software program that converts C source code into machine code that can be executed by a
computer. It checks the program for syntax errors, translates the code into executable form, and generates an output
file. Popular C compilers include GCC (GNU Compiler Collection), MinGW GCC, and Microsoft Visual C
Compiler.
Virtual Machine (VM)
A Virtual Machine (VM) is a software-based emulation of a physical computer that allows multiple operating
systems to run on a single physical machine. Each virtual machine has its own operating system, memory, storage,
and applications, functioning independently from the host system. Virtual machines are created and managed using
virtualization software such as Oracle VirtualBox or VMware Workstation.
Advantages of Virtual Machine
• Multiple operating systems can run on a single computer.
• Provides an isolated environment for testing and development.
• Reduces hardware costs by sharing physical resources.
• Easy to create, copy, and manage virtual systems.
• Improves system flexibility and resource utilization.
Applications of Virtual Machine
• Software development and testing.
• Running multiple operating systems simultaneously.
• Training and educational laboratories.
• Application compatibility testing.
• Server virtualization and cloud computing.
pf2

Partial preview of the text

Download Cloud Computing Lab Manual Practical Journal Assignment 3 SPPU TE AIDS 2024 Pattern and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

Laboratory Assignment No. 4

Title: Install a C Compiler in the Virtual Machine and Execute a Simple Program Problem Statement: Install a C compiler in the virtual machine created using VirtualBox and execute a simple C program. Aim: To install a C compiler in a virtual machine and execute a simple C program. Objectives:

  • To understand the concept of a virtual machine.
  • To install a C compiler in the virtual machine.
  • To write and execute a simple C program.
  • To understand the basic compilation and execution process.
  • To verify the successful installation of the C compiler. Software Requirements: Windows 10/11 Operating System, Oracle VirtualBox, Windows Virtual Machine, Code::Blocks IDE with MinGW Compiler, Microsoft Word (for documentation) Hardware Requirements: Computer or Laptop, Minimum 4 GB RAM, Intel Core i3 Processor or above, At least 20 GB Free Disk Space Theory:

C Compiler

A C compiler is a software program that converts C source code into machine code that can be executed by a computer. It checks the program for syntax errors, translates the code into executable form, and generates an output file. Popular C compilers include GCC (GNU Compiler Collection), MinGW GCC, and Microsoft Visual C Compiler.

Virtual Machine (VM)

A Virtual Machine (VM) is a software-based emulation of a physical computer that allows multiple operating systems to run on a single physical machine. Each virtual machine has its own operating system, memory, storage, and applications, functioning independently from the host system. Virtual machines are created and managed using virtualization software such as Oracle VirtualBox or VMware Workstation. Advantages of Virtual Machine

  • Multiple operating systems can run on a single computer.
  • Provides an isolated environment for testing and development.
  • Reduces hardware costs by sharing physical resources.
  • Easy to create, copy, and manage virtual systems.
  • Improves system flexibility and resource utilization. Applications of Virtual Machine
  • Software development and testing.
  • Running multiple operating systems simultaneously.
  • Training and educational laboratories.
  • Application compatibility testing.
  • Server virtualization and cloud computing.

Procedure:

  1. Install Oracle VirtualBox on the host computer.
  2. Create a new virtual machine and install the Windows operating system.
  3. Start the virtual machine and complete the Windows setup.
  4. Download and install the Code::Blocks IDE with the MinGW or Dev-C++ compiler inside the virtual machine.
  5. Launch Code::Blocks or Dev-C++.
  6. Create a new C source file.
  7. Type the following C program: #include int main() { printf("Hello, World!"); return 0; }
  8. Save the file as hello.c.
  9. Click Build and Run to compile and execute the program.
  10. Verify that the output displays "Hello, World!" successfully. Linux VM If your VM is Ubuntu/Linux, install GCC using the terminal: sudo apt update sudo apt install gcc Then compile and run the program. Conclusion: A C compiler was successfully installed in the virtual machine, and a simple C program was compiled and executed successfully.