C++ Programming Basics

C++ Programming Language Introduction
Hello world
Comments in C++
Escape sequences – special characters
Input / output
Understanding Namespaces in C++
Data types and variables
Data types in C++
Declaration and initialization
Range of values and memory size of all data types
Datatype string
Read out memory of Data Type
Operators
Operators in C++
Arithmetic operators
Relational and logical operators
Bitoperators
Ternary operator
Conversion Programs
C++ Code Example: convert celsius to fahrenheit
C++ Code Example: convert decimal to hexadecimal number
C++ Code Example: convert decimal to binary number
C++ Code Example: convert decimal to octal number
C++ Code Example: Convert different data types to int
More Code Examples
Basic code examples
11 Topics
Average of 3 numbers (included number rounding)
Circumference and circular area
ASCII value of character
Quotient and remainder
Swap two values
Perfect number
Spy number
Armstrong number
Permutation and combination of 2 numbers
Generate random numbers
Palindrome number
C++ Code Example: check password strength
Cheat Sheet
C++ Basics Cheat Sheet
C++ Basics Part 1
codevisionz logo
Previous Lesson
Next Lesson

Basic code examples

C++ Programming Basics Basic code examples
Check out more code examples covering the basics of the c++ programming language:
Lesson Content
0% Complete 0/11 Steps
Average of 3 numbers (included number rounding)
Circumference and circular area
ASCII value of character
Quotient and remainder
Swap two values
Perfect number
Spy number
Armstrong number
Permutation and combination of 2 numbers
Generate random numbers
Palindrome number
Previous Lesson
Back to Tutorial
Next Lesson
Click to Copy
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-advertisement1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent1 yearRecords the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
CookieDurationDescription
_gat1 minuteThis cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
CookieDurationDescription
_ga2 yearsThe _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_gid1 dayInstalled by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
tk_lr1 yearThe tk_lr is a referral cookie set by the JetPack plugin on sites using WooCommerce, which analyzes referrer behaviour for Jetpack.
tk_or5 yearsThe tk_or is a referral cookie set by the JetPack plugin on sites using WooCommerce, which analyzes referrer behaviour for Jetpack.
tk_r3d3 daysJetPack installs this cookie to collect internal metrics for user activity and in turn improve user experience.
tk_tcsessionJetPack sets this cookie to record details on how user's use the website.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
CookieDurationDescription
m2 yearsNo description available.
SAVE & ACCEPT
Powered by CookieYes Logo
Login
Accessing this tutorial requires a login. Please enter your credentials below!

Lost Your Password?
codevisionz logo
Register
Don't have an account? Register one!
Register an Account