Lab Report 1
Lab Report 1
Lab Report 01
1st SEMESTER
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
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
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;
Output: