0% found this document useful (0 votes)
9 views5 pages

Experiment No.: 03: Title: Aim: Objectives

The document outlines an experiment focused on installing a C compiler in a virtual machine using VirtualBox and executing a simple program. It covers the definition of a virtual machine, the creation of services within it, and the concepts of Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Application as a Service (AaaS). The outcomes include learning to manage a virtual machine, configuring services, and successfully executing a C program for an arithmetic calculator.

Uploaded by

Kartik Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Experiment No.: 03: Title: Aim: Objectives

The document outlines an experiment focused on installing a C compiler in a virtual machine using VirtualBox and executing a simple program. It covers the definition of a virtual machine, the creation of services within it, and the concepts of Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Application as a Service (AaaS). The outcomes include learning to manage a virtual machine, configuring services, and successfully executing a C program for an arithmetic calculator.

Uploaded by

Kartik Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

EXPERIMENT NO.

: 03
TITLE: Install a C compiler in the virtual machine created using virtual box and execute simple
program.
AIM: To install C compiler in virtual machine using virtual box and execute simple program
OBJECTIVES:
1. To learn and understand about virtual machine.
2. To learn and understand about creating services in virtual machine.
3. To learn and understand about 3 services :
 Infrastructure –as –a –service(IaaS)(hardware,memory,storage,CPU)
 Platform operating system
 Installing applications and programming languages.
4. To install C/GCC compiler in linux virtual machine.
5. Generate simple arithmetic calculator using virtual c program.

1.What is a virtual machine?


 A Virtual Machine (VM) is a compute resource that uses software instead of a physical
computer to run programs and deploy apps. One or more virtual “guest” machines run on
a physical “host” machine. Each virtual machine runs its own operating system and
functions separately from the other VMs, even when they are all running on the same
host. This means that, for example, a virtual MacOS virtual machine can run on a
physical PC.
 Virtual machine technology is used for many use cases across on-premises and cloud
environments. More recently, public cloud services are using virtual machines to provide
virtual application resources to multiple users at once, for even more cost efficient and
flexible compute.

2.Creating services in virtual machine:


1. Edit the VirtualMachine manifest to add the label for service creation.
2. Save the VirtualMachine manifest file to apply your changes.
3. Create a Service manifest to expose the VM
4. Save the Service manifest file.
5. Create the service by running the following command
6. Start the VM. If the VM is already running, restart it.

3.services:

 Virtual machine can offer 3 basic services:


a. Infrastructure as a Service(IaaS)(CPU,memory,storage)
b. Platform as a Service(PaaS)(windows,linux,mac,android)
c. Application as a Service(AaaS)(office,3D designing,etc.) and also it is compactable to
programming languages such as c,cpp,java,python and much more

Infrastructure as a Service [IaaS]:


Infrastructure as a service (IaaS) is a service model that delivers computer infrastructure on an
outsourced basis to support various operations. Typically IaaS is a service where infrastructure is
provided as outsourcing to enterprises such as networking equipment, devices, database, and web
servers.
It is also known as Hardware as a Service (HaaS).

Platform as a Service[PaaS]:
PaaS is a category of cloud computing that provides a platform and environment to allow
developers to build applications and services over the internet. PaaS services are hosted in the
cloud and accessed by users simply via their web browser.

Application as a Service[AaaS]:
"Application as a Service" (AaaS) refers to a cloud-based model where users access and utilize
applications hosted on a remote server, without needing to install, manage, or maintain the
software on their own devices.

Additional learning
Basic commands in linux:
1. sudo apt install
2. ls
3. man

Operations of file:
1. Creation
2. Editing
3. append
4. delete
Directory operations:
1. create
2. add subfolders on file
3. changing privilges
4. delete

OUTCOMES:
 I learned how to set up and manage a virtual machine.
 I came to know how to create and configure various services within a virtual machine.
 I understood the concepts of Infrastructure-as-a-Service (IaaS), Platform as a Service
(PaaS), and how to install and manage operating systems and applications within a virtual
machine.
 I learned how to install a C compiler on a Linux virtual machine and create a simple
arithmetic calculator using a C program.

OUTPUT:
RESULT: Thus the simple hello world! c program and calculator c program is executed
successfully.

Give 5 viva questions.

1. What is a Virtual Machine (VM)?


a. A physical server running an OS
b. A software-based simulation of a physical computer
c. A type of cloud storage
d. A hardware component of a computer

Answer: b) A software-based simulation of a physical computer

2. Which of the following is an example of Infrastructure-as-a-Service (IaaS)?


a. Google Cloud Functions
b. Microsoft Azure Virtual Machines
c. AWS Lambda
d. Salesforce

Answer: b) Microsoft Azure Virtual Machines

3. What command is used to install GCC on a Debian-based Linux system?


a. sudo apt install gcc
b. sudo yum install gcc
c. sudo pacman -S gcc
d. sudo zypper install gcc

Answer: a) sudo apt install gcc

4. What steps are involved in installing a C compiler on a Linux virtual machine?


Update package lists, install GCC using sudo apt install gcc, and verify installation with
gcc --version.

5. How did you develop the arithmetic calculator using C in a virtual Linux
environment?
I wrote the C program in a text editor, compiled it using GCC, and ran it to perform basic
arithmetic operations based on user input.

You might also like