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

Basic details of c++ programing language

Rating
-
Sold
-
Pages
1
Uploaded on
20-03-2024
Written in
2023/2024

This document refers to the basic needs and details of c++ programing language for bigeners.It helps the students to describe the c++ language through this document.It will be helpful for the students.

Institution
Course

Content preview

C++ Tutorial For Beginners | C++ Programming | C++ | C++ Basics | C++ For Beginners | Simplilearn

Simplilearn

C++ Basics Tutorial

Welcome to this tutorial on C++ basics! In this tutorial, we will cover the basics of C++ programming,
including how to write your first program, types and variables, arrays, strings, control statements
(if/else, for loop, while loop), and functions.



Let's start with an introduction to C++ programming. C++ is a popular programming language
introduced by John Strawstrom in 1979. It was initially called "C with Classes" as it was an extension
to the C language, but later renamed as C++. It is a general-purpose, case-sensitive language that is
precompiled, meaning it converts the source code directly to machine-understandable code. It is an
intermediate-level language as it contains both features of high-level and low-level languages. C++
supports the features of object-oriented programming, procedural programming, and functional
programming as well.



Now, let's move on to our first program in C++, which is the "Hello World" program. In this program,
"Hello World" is printed. It is a very basic program, and we are using the header file "iostream" to
import the necessary features. The main function is used to execute the program, and we are
printing "Hello World" using the "cout" function.



#include <iostream>using namespace std;int main() { cout << "Hello World" << endl; return 0;}

Next, we will cover types and variables in C++. There are different types of data types that act as a
keyword, such as boolean (for true/false values), character (for alphabets and symbols), integer (for
integer values), and float (for decimal values). Variables are used to store values, and the syntax to
define a variable is to mention the data type and the variable name.



Arrays are a collection of similar elements stored in contiguous memory locations. They make it
possible to store multiple values of the same data type into a single variable. The syntax to declare
an array is to mention the data type, the array name, and the number of elements inside the
brackets.



Strings are a collection of characters and are used to represent text in the program. There are two
ways to create a string: C-style strings and string objects. C-style strings are stored in the form of
arrays, while string objects are implemented in the standard library and must be included in the
program using "#include"

Connected book

Written for

Course

Document information

Uploaded on
March 20, 2024
Number of pages
1
Written in
2023/2024
Type
Class notes
Professor(s)
Shiva
Contains
All classes

Subjects

$10.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
sivasundar

Get to know the seller

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