[go: up one dir, main page]

0% found this document useful (0 votes)
229 views7 pages

Operating System Lab: Bahria University, Islamabad

This document summarizes the tasks completed in Operating System Lab, CSL 320. The objectives were to understand coding in bash, C and C++ in Ubuntu. Various tasks were completed like taking input in bash, comparing numbers in bash, installing and checking gcc and g++ versions, and writing "Hello World" programs in C and C++. Code was written in bash files and C/C++ files and results were displayed in the terminal.

Uploaded by

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

Operating System Lab: Bahria University, Islamabad

This document summarizes the tasks completed in Operating System Lab, CSL 320. The objectives were to understand coding in bash, C and C++ in Ubuntu. Various tasks were completed like taking input in bash, comparing numbers in bash, installing and checking gcc and g++ versions, and writing "Hello World" programs in C and C++. Code was written in bash files and C/C++ files and results were displayed in the terminal.

Uploaded by

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

Operating System Lab

CSL 320

Lab Journal 6

Student Name: Jibran Mehtab Abbasi


Enrolment No.: 01-134162-016
Class and Section: BS(CS) 6-B
Submited to Ma’am Mehroz Sadiq

Department of Computer Science


BAHRIA UNIVERSITY, ISLAMABAD
Lab # 6: Coding in bash,C and C++ in Ubuntu

Objectives:

1. To understand coding concept in bash, C and C++ in Ubuntu.

Tools Used:

1. VMware Workstation.
2. Ubuntu ISO.
3. Terminal
4. Bash file

Submission Date: : 14/11/2019

Evaluation: Signatures of Lab Engineer:


Task #1:Take two input in bash file and show result in terminal
1.1: Creating bash file using terminal

1.2:Taking two input in bash file

1.3:Result of terminal of bash coding

Task#2:Take two input and compare them using bash coding


2.1:Code in bash file for two inputs and compare then using if else

2.2:Showing output in terminal


Task #3:Compare two number if they are equal,less than or greater than.
3.1:Code in bash using if elif and else

3.2:Results in terminal

Task #4:Compare 3 number and find which is greater


4.1:Code in bash file to find greater

4.2:Results of bash file in terminal


Task #5:Install and Check version of gcc and gpp in terminal and code “Hello world” in
C and Cpp language in Ubuntu
5.1:Checking gcc and gpp version and if it is intall or not

5.2:Making C file using terminal

5.3:C language code for printing hello world

5.4:Result in terminal

5.5:C++ language code for printing hello world

5.6:Accessing file from terminal and its Results


Task #6:Make any three programs of C plus plus in Ubuntu using text file
6.1:Finding largest number amoung 3 integer
6.1.1:Code for cpp fille in text file

6.1.2:Results from terminal

6.2:Write a program for factorial in C plus plus.


6.2.1:Code for factorial program in cpp file
6.2.2:Accessing file from terminal and its result

\
6.3-Write a program for for even and odd number in Cpp
6.3.1:Code for factorial program in cpp file

6.2.2:Accessing file from terminal and its result

You might also like