Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

All basics of Datastructures

Rating
-
Sold
-
Pages
7
Uploaded on
14-01-2021
Written in
2020/2021

All basics of Data Structures

Institution
Course

Content preview

LAB # 01

Statement Purpose:
This lab will give you an overview of C++ language.


Activity Outcomes:
This lab teaches you the following topics:

 Basic syntax of C++
 Data types and operators in C++
 Control flow statements in C++
 Arrays and Functions

Instructor Note:
Introduction to Programming in C++
 https://ece.uwaterloo.ca/~dwharder/aads/Tutorial/
 http://www.cplusplus.com




3

, 1) Stage J (Journey)

Introduction
C++, as we all know is an extension to C language and was developed by Bjarne
stroustrup at bell labs. C++ is an intermediate level language, as it comprises a
confirmation of both high level and low level language features.

Following features of C++ makes it a stronger language than C,


1. There is Stronger Type Checking in C++.
2. C++ supports and allows user defined operators (i.e Operator Overloading) and
function overloading is also supported in it.
3. Exception Handling is there in C++.
4. Inline Functions in C++ instead of Macros in C language. Inline functions make
complete function body act like Macro, safely.
5. Variables can be declared anywhere in the program in C++, but must be declared
before they are used.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Write a Hello World program in C++.

Solution:
#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World! ";
cout << "I'm a C++ program";
}

Activity 2:

Write a program to use different data types in C++

Solution:

4

Written for

Institution
Course

Document information

Uploaded on
January 14, 2021
Number of pages
7
Written in
2020/2021
Type
Class notes
Professor(s)
Rashid mehmood
Contains
All classes

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
youtubecanvas

Get to know the seller

Seller avatar
youtubecanvas COMSATS Institute Of Information Technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
5 year
Number of followers
0
Documents
18
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions