C++ Functions and tutorial
eBook - ePub

C++ Functions and tutorial

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

C++ Functions and tutorial

About this book

In this text we are shown examples for both those who are just starting out in this language for intermediate programmers, in order to deepen the knowledge in a practical and therefore easy and fast learning, in fact, doing practical examples you can understand and learn quickly what you are seeing. In this text are presented 40 examples of functions and instructions are not very large to facilitate learning and minimizing confusion in the code, especially for those just starting out, because especially for those who are beginners a long code can be slow down the learning curve.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weโ€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere โ€” even offline. Perfect for commutes or when youโ€™re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access C++ Functions and tutorial by Nino Paiotta in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in C++. We have over one million books available in our catalogue for you to explore.

Information

C++
C ++ is one of the most powerful programming languages, in fact it is used in many of a certain importance software.
In this text we are shown examples for both those who are just starting out in this language for intermediate programmers, in order to deepen the knowledge in a practical and therefore easy and fast learning, in fact, doing practical examples you can understand and learn quickly what you are seeing.
In this text are presented 40 functions and other instructions with examples not very large to facilitate learning especially for those just starting out.
INDEX
1) Insert a string
2) The function setprecision
3) La funzione setw
4) Writing to a file
5) Read a file
6) The goto
7)Iinstruction if eslse
8) A small program that writes to a file
9) If esle if
10) The functions
11) Overloading of functions
12) The function strcpy
13) The function strcat
14) The function strlen
15) The function substr
16) The function replace
17) The function find
18) The function insert
19) The function length
20) The function tolower
21) The function toupper
22) Define
Some mathematical functions
23) The function sqrt
24) The function pow
25) Generate random numbers
26) The abs function
27) The functions getchar e putchar
28) A program that only accepts numbers
29) The operator ?
30) Clean the screen
31) The operator sizeof
32) Pause a program
33) To issue an acoustic signal (beep)
34) The instruction continue
35) The function getline
36) The instruction switch
37) assignment compound
38) The increment operator ++
39) the decrement operator - -
40) Convert the data types
1)
Enter a string
#include <iostream>
using namespace std;
int main()
{
char n[8];
cout << "Inserisci max 8 caratteri" << endl ;
cin >> n;
cout << n ;
return 0;
}
Declare an array of 8 characters, then we ask the user to enter characters using the cin function and eventually we print on screen the characters you have entered the function cout, endl is used for the carriage return.
2)
The function setprecision
With setprecision () function we can take a certain number of digits to be printed on the screen.
To ensure that you do not get an error you have to insert the header file <iomanip> as it appears in the following example.
#include <iostream>
#include <string>
#include <iomanip>
usi...

Table of contents

  1. Cover
  2. C++