Basics of C++ Programming

What is C++ ?

is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or “C with Classes”. The language has expanded significantly over time, and modern C++ now has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation. It is almost always implemented as a compiled language, and many vendors provide C++ compilers. C++ was designed with an orientation toward system programming and embedded, resource-constrained software and large systems, with performance, efficiency, and flexibility of use as its design highlights. C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications,including desktop applications, video games, servers (e.g. e-commerce, web search, or databases), and performance-critical applications (e.g. telephone switches or space probes).

Tokens in C++

  1. Identifiers: Identifiers are names given to different elements such as variables,arrays, structures, functions, classes, objects etc.It should not be keywords
  2. Keywords: These are reserved words used for specific purpose in a program. Keywords have fixed meaning, and its meaning cannot be changed.
  3. Constants:
  4. Constants are like a variable, having fixed value . Their value never changes during execution of program once they are defined.
  5. Strings: A sequence or a set of characters is known as a string.
  6. Operators: C++ operator is a symbol that is used to perform mathematical or logical operations.

Keywords in C++

asm continue float new static unsigned
auto default for private struct using
bool delete friend protected switch virtual
break do goto public template void
case double if register this volatile
catch else inline return throw wchar_t
char enum int short try while
class extern long signed typedef
const export namespace sizeof union

Datatypes in C++

Sr. No. Data Type Category Data Types
Built-in Data Types char, wchar_t, int, long, float, double, long double
Derived Data Types Array , Pointer
User-defined data types Structure, Union,  Class and Enumerated
4Data Qualifiers / Modifiers short, long , signed , unsigned

Operators in C++

Sr. No. Type of operators Operators
Arithmetic operators + – * / %
Unary operators – ++ – –
Relational operators < <= > >= == !=
Logical operators ! || && 
Assignment operators = += -= *= /= %=
Conditional operator ? :
Bitwise operators | Bitwise OR & Bitwise AND ^ Bitwise Ex-OR ~ 1’s complement << Shift Left >> Shift Right

Variables in C++

•Variables are the name of memory locations that are allocated by compilers, and
the allocation is done based on the data type used for declaring the variable.

Decision Making Statements in C++

  1. if statement
  2. if-else statement
  3. Nested if-else statement
  4. else-if ladder statement
  5. switch statement

Looping Statements in C++

  1. while statement
  2. do-while Statement
  3. for statement
  4. Nested Loops

Control Statements in C++

  1. break statement
  2. continue statement

Structures in C++

•A set or a group of data items of different data types defined in a single
unit is known as a structure.
•A structure is a convenient tool for handling a group of logically related data items.
•A structure is a user defined data type
•Once the structure type has been defined, it is easy to create variables of that type
using declarations

C++ Compilers

  1. MinGW / GCC
  2. Borland C++
  3. Dev C++
  4. Embracadero
  5. Clang
  6. Visual C++
  7. Intel C++
  8. Code Block

Programming languages that you must learn! [Part 1]

[By Bhoomika Saini]

Photo by ThisIsEngineering on Pexels.com

Each programming language is designed for a specific purpose and has its relative merits and demerits. Also, the answer to the most useful programming language to learn is subjective and depends on your familiarity with coding.

Below, I’ve listed some of the Most Useful Programming Languages you can learn right now!

  1. PYTHON

Python language developed by Guido van Rossum. It was first released in 1991. It is one of the best programming language to learn which supports multiple systems and platforms.

It is one of the best coding language to learn that allows you to scale even the most complex applications with ease. It is used in Web and Internet Development, Scientific and Numeric applications, Desktop GUIs, Business applications. It is widely used in AI and Machine Learning space. Python is considered one of the easiest programming languages to learn!

2. JAVA

James Gosling primarily designed Java at Sun Microsystems in the year 1996. Java offers APIs for different activities like Database connection, networking, XML parsing, utilities, etc.

It is one of the best programming language to learn that has large number of open source libraries. Memory management in Java is quite expensive! Learning Java is simple and easy. Java mostly used for developing Android apps, web apps, and Big data.

3. C++

C++ is a programming language that was developed by Bjarne Stroustrup in 1983.It is a popular language, and thus, there are many compilers and libraries. Other programming languages like C, C#, and Java have very similar syntax to C++, make it easy to learn for everyone who knows C++.

It is one of the popular coding languages which has no garbage collector running in the background. C++ program can’t support garbage collection or Dynamic Memory Allocation. C++ is widely used in Game Development, Advance Computations, and Graphics Compilers.

Photo by Christina Morillo on Pexels.com

4. JAVASCRIPT

JavaScript was earlier called Live Script when it first shipped in with Netscape Navigator 2.0 in September 1995. Later, it was renamed as a JavaScript.

JavaScript is one of the best coding language to learn which is relatively simple to learn. It is one of the best programming language to learn which can work smoothly with other languages and can be used in a huge variety of applications. JavaScript only allows single inheritance, so multiple inheritances are not possible. JavaScript usage include web/mobile app development, game development, and desktop app development.

5. SWIFT

Apple developed Swift in 2014 for Linux and Mac applications. 

An open-source programming language that is easy to learn, Swift supports almost everything from the programming language Objective-C. Swift requires fewer coding skills compared with other programming languages, and it can be used with IBM Swift Sandbox and IBM Bluemix. Swift is used in popular iOS apps like WordPress, Mozilla Firefox, SoundCloud, and even in the game Flappy Bird.

5. GO

Go was developed by Google in 2007 for APIs and web applications. Go has recently become one of the fastest-growing programming languages due to its simplicity, as well as its ability to handle multicore and networked systems and massive codebases.

Go, also known as Golang, was created to meet the needs of programmers working on large projects. It has gained popularity among many large IT companies thanks to its simple and modern structure and syntax familiarity. Companies using Go as their programming language include Google, Uber, Twitch, Dropbox, among many others. Go is also gaining in popularity among data scientists because of its agility and performance.