Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

Lab Report 1

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lab Report 1

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Fundamentals of Programming Lab

Lab Report 01

1st SEMESTER

Submitted to: Engr. Ali Hassan


Session: Section: A Group: 2
SUBMITTED BY
Sr. Lab
No. Names CMSID Report Lab work Lab Tasks Total
(Theory)
1 Muhammad Abdullah 405642
Zafar Ghauri
Lab Report #01
Objectives:
• To learn about a Computer and its whereabouts
• Learn about Programming and acquiring knowledge about different programming
languages
• To come across knowledge about different errors that we come across during
programming
• To learn about IDE’s (Integrated Development Environment)
• Acquiring knowledge about Visual Studio Code ( and highlighting problems faced
during its downloading)

Theory:
1. Computer: Computer is a machine which in easiest ways can be defined as a
machine that is meant top solve problems (both simple and complex)
2. Program: A program is a set of instructions that is provided to the computer in
order top solve problems. A program that is being fed to the computer is converted
to Machine language in the form of 0’s and 1”s . The process of feeding a program is
called programming.
3. Errors: Errors can be defined as some basic mistakes committed by a programmer
during the process of programming. There are basically 3 types of errors
• Syntax/Parse Errors: Mistakes that exist within a language. Such errors are
always notified by the compiler
• Linking Errors: Due too linking errors, missing pieces prevent the final
assembly of executable program.
• Run-Time Errors: They occur when a program is executing. Sometimes they
are reported and sometimes not.
4. IDE’s (Integrated development Environment): It is a software that aids programming

Visual Studio Code:


Visual Studio Code is an IDE (Integrated Development
Environment) developed by Microsoft Inc. for aiding programming in different
programming languages. It is a streamlined code editor with support for
development operations like debugging, task running, and vision control. It aims just
to provide the tools that a developer needs for quick code-build-debug cycle .
By 2016, VSCode ranked amongst top 13 Development tools on Stockover flow.
A good advantage of VSCode is that it is highly GUI (Graphical User Interface)
supported. It allows the programmer to use many different colors in programming
making programming rather more interesting and aesthetic.
Lab Task

Q. Download VSCode application in them computer notifying the steps taken in


downloading process and highlight the hurdles faced during he process(If faced).

Procedure:
Step 1: Open the Google Chrome

Step 2: Search “ Visual Studio Code” on Google. This will lead you to relevant
website as https:// https://visualstudio.microsoft.com/

Step 3: Download Visual studio Code from drop-down menu that appears. (Light Blue
Box)

Step 4: Download C/C++ Extension . Once downloaded, Visual Studio Code. Once

downloaded, VS Code is ready for programming.


Miscellaneous Program and its Output

Input Code:

Program 1:
#include<iostream>
using namespace std;

void main()
{
cout << "\n He is a Good Boy";
}

Output:

Program 2:
Q. Write a program demanding user his favorite number and telling him tentatively
the year of his death (tentatively).
Program:

#include<iostream>
using namespace std;

int main()
{
cout << "\n My first Program";
int a;
cout << "\n Please enter your favorite Number=";
cin >> a;

int b;
b= a+2022;

cout << "\n You will die in Year:" << b;

Output:

You might also like