Cpp Tutorial: C++ Looping Statements
1. While loop 2. Do .. while loop 3. For loop 4. Break 5. Continue 6. Nested loops Looping statements are used when we want to repeat the same set of statements again and again. Those set of statements will be executed until a particular condition is satisfied. Below we discuss about various types of […]
Cpp Tutorial: C++ Decision making statements
There are 6 types of Decision statements available in c++: 1. if 2. if else 3. nested if 4. conditional operator or ternary operator 5. switch statement 6. break 7. goto statement Decision making statements are used to change the flow of execution of the program from one part to another part of the program. […]
Cpp Tutorial: C++ qualifiers and C++ Operators
1. C++ qualifiers 2. C++ Operators 1. C++ qualifiers C++ provides one of two qualifiers. 1. Volatile: When a variable is defined as volatile, then the value can be changed. By default, if you create a variable, it is declared as a “volatile” variable. “volatile” is the keyword. Example: volatile int num = 10; num […]
Cpp Tutorial: C++ Special operators
In this tutorial we will learn about below topics: 1. Referencing operator 2. Dereferencing operator 3. Scope resolution operators 4. Memory management operators 5. Namespace 6. Comma operator 7. Arrow operator 8. This pointer 1. Referencing Operator: Referencing operator (&): This operator is used to define a referencing variable. A reference variable is used to […]
Cpp Tutorial: C++ Variables, Data Types, variable scope and Storage Classes
In this chapter we shall look at below topics: 1. C++ variables 2. C++ Data types 3. C++ Enums 4. C++ variable scope 5. C++ Storage Classes 6. C++ Escape Sequences 1. C++ variables Variables are the name given to a memory location. They are used to store a value. Every variable is associated with […]
Cpp Tutorial: C++ Input Output, and C++ Comments
In this chapter we shall look into below topics: 1. Basic C++ input and Output: 2. Standard error 3. Standard Log 4. Type Casting with “cout” 5. get() and put() functions 6. getline() and write() 7. C++ comments 1. In C++ input and output occurs in stream of bytes. If the stream of sequence of […]
Cpp Tutorial: C++ Introduction
In this chapter we shall study about 1. C++ introduction 2. C++ Features 3. C++ Hello World program with explanation 4. C++ Tokens 5. C++ Keywords C++ is often considered as a first programming language to be learned. Because it is easy to learn. Our C++ tutorial has been designed in such a way that […]
Advanced C Pointer Programming chapter 8: Pointers and functions
Functions are building blocks of C programming language. In this chapter we shall see different ways to pass pointers to a function. We shall concentrate on 2 aspects. 1. Sending pointers to a function 2. Returning pointers from a function. Passing variable by pointer This type of passing is also called as pass by value. […]
Advanced C Pointer Programming chapter 7: Pointers and Structures.
In C, after arrays, structures are the most important data structure available for programmers. We shall understand different ways to initialize memory to structure and accessing elements inside a structure. Creating simple structure and accessing elements inside them In this example, we shall create a structure variable inside main and allocate memory in stack. Below […]
Advanced C Pointer Programming chapter 6: Pointers and Strings.
There is no separate data type in C to hold strings. In C, strings are character array. They should always end with NULL “\0” character. While allocating memory for strings, space should be allocated for NULL character also. C allows us to create a static strings or dynamic strings using pointers. We usually send C […]