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

Lecture notes Civil engineering 1 year (CHM-111 CS-111)

Rating
-
Sold
-
Pages
60
Uploaded on
13-03-2026
Written in
2025/2026

There is a lot of information in these notes. These are the notes of first year second semester of civil engineering in which the chapter of chemistry is explained about horizon and first unit and second unit of CS.These notes can help you in your exams which are going to be your final year exam of second semester so please say goodbye to them.I have made all the points and details in these, so please check them out once.

Show more Read less
Institution
Course

Content preview

CS-111
UNIT I


A ) Introduction to C++
 C++ is a multi-paradigm programming language that supports object-oriented
programming (OOP), created by Bjarne Stroustrup in 1983 at Bell Labs, C++
is an extension(superset) of C programming and the programs are written in C
language can run in C++ compilers.

 C++ is regarded as a middle-level language, as it comprises a combination of
both high-level and low-level language features.

 originally named C with Classes but later it was renamed C++ in 1983.

 C++ is a superset of C, and that virtually any legal C program is a legal C++
program.

 C++ is used by programmers to create computer software. It is used to create
general systems software, drivers for various computer devices, software for
servers and software for specific applications and also widely used in the
creation of video games.

 C++ is used by many programmers of different types and coming from
different fields. C++ is mostly used to write device driver programs, system
software, and applications that depend on direct hardware manipulation under
real-time constraints.



C++ compilers
Borland C++
Turbo C++
Microsoft Visual C++
Zortech C++
UNIX C++ (AT&T)
GNU Compiler
Collection (GCC)

, B) C++ TOKENS

Token-- Each individual word and punctuation is referred to as a token in C++.
Tokens are the smallest building block or smallest unit of a C++ program.
These following tokens are available in C++:

● Identifiers
● Keywords
● Constants
● Operators
● Strings


1) Identifiers are names given to different entries such as variables, structures, and
functions.

Also, identifier names should have to be unique because these entities are used in the
execution of the program.

A C++ identifier is a name used to identify a variable, function, class, or any other
user-defined item.

a) An identifier starts with a letter A to Z or a to z or an underscore (_) followed by
zero or more letters, underscores, and digits (0 to 9).

b) C++ does not allow punctuation characters such as @, $, and % within identifiers.

c) C++ is a case-sensitive programming language. Thus, Manpower
and manpower are two different identifiers in C++.

Here are some examples of valid identifiers names −

abc a_123 _temp j a23b9 retVal


2) Keywords are reserved words which have fixed meaning and its meaning cannot
be changed. The meaning and working of these keywords are already known to the
compiler. C++ has more numbers of keyword than C and those extra ones have special
working capabilities.

,The following list shows the reserved words in C++. These reserved words may not be
used as constant or variable or any other identifier names

else new this


auto ------ operator throw


bool ------ private true


break export protected try


case extern public typedef


catch false register typeid


char float -------- typename


class for return union


const friend short unsigned


goto signed using


continue If sizeof virtual


default Inline static void


delete Int static_cast volatile

, do Long struct char


double mutable switch while


dynamic_cast namespace template




3) Constants

Constants are like a variable, except that their value never changes during execution
once defined.

● 4) Operators

C++ operator is a symbol that is used to perform mathematical or logical
manipulations. Dicussed later




C) C++ P rogram Structure

Let us look at a simple code that would print the words Hello World.

#include <iostream>
using namespace std;


// main() is where program execution begins.
int main() {
cout << "Hello World"; // prints Hello World
return 0;
}

Let us look at the various parts of the above program −

Written for

Institution
Course

Document information

Uploaded on
March 13, 2026
Number of pages
60
Written in
2025/2026
Type
Class notes
Professor(s)
Atul
Contains
All classes

Subjects

$8.49
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
opatul

Get to know the seller

Seller avatar
opatul Jngce
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 month
Number of followers
0
Documents
2
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