/ 2 min read

What is Dangling Pointer with Cause and How to avoid it?

Dangling pointers in computer programming are pointers that pointing to a memory location that has been deleted (or freed). Dangling pointers arise during object destruction, when an object that has an incoming reference is deleted or deallocated, without modifying the value of the pointer, so

/ 1 min read

What is Digraphs, Trigraphs and Tokens? - C/C++ Programming Language

In computer programming, digraphs and trigraphs are sequences of two and three characters, respectively, that appear in source code and, according to a programming language specification, should be treated as if they were single characters. Why Digraphs and Trigraphs exist? Various reasons exist for using

/ 3 min read

Introduction to C++ - C++ Programming

1. What is C++? C++ (pronounced "see plus plus") is a programming language began as an expanded version of C. The C++ were first invented by Bjarne Stroustrup in 1979 at Bell Laboratories in Murray Hill, New Jersey. Bjarne Stroustrup initially called the

/ 1 min read

C/C++ Compiler (gcc) for Android - Run C/C++ programs on Android

C4droid is a user-friendly (but powerful) C/C++ IDE + C/C++ compiler for Android. Basic features of C4droid: Offline C compiler: create your own applications on Android device and run them even without Internet access Source code editor with syntax highlighting, tabs, code completion, code

/ 1 min read

The do..... while loop in C++

The do.... while loop checks its condition at the bottom of the loop. A do.... while loop is similar to a while loop. The one difference is that the do.... while loop is guaranteed to execute at least one time. Syntax: do { statement(s); }while(

/ 1 min read

The for loop in C++

A for loop is a repetition control structure that allows you to efficiently write a loop that executes a specific number of times. Syntax: for(init;condition;increment ) { statement(s); } The init step is executed first, and does not repeat. Next, the condition is evaluated,

/ 1 min read

The while loop in C++

Loops: A loop repeatedly executes a set of statements until a particular condition is satisfied. A while loop statement repeatedly executes a target statement as long as a given condition remains true. Syntax: while(condition) { statement(s); } The loop iterates while the condition is true.

/ 1 min read

Nested if & if/else Statements in C++

Nested if statements: You can also include, or nest, if statements within another if statement. For example: int mark = 100; if (mark >= 50) { cout << "You passed." << endl; if (mark == 100) { cout <<"Perfect!" <<

/ 1 min read

Relational operator of C++

Additional relational operators: Operator Description Example == Equal to 4==2 False <= Less than or equal to 4<=2 False >= Greater than or equal to 4>=2 True != Not equal to 4!=2 True Example: if(10==10) { cout<<"

/ 1 min read

If else statement in C++

Else statement: An if statement can be followed by an optional else statement, which executes when the condition is false. Syntax: if(condition) { //statements } else { //statements } The compiler will test the condition: :-If it evaluates to true, then the code inside the if statement will

/ 1 min read

If Statement in C++

Decision Making: The if statement is used to execute some code if a condition is true. Syntax: if(condition) { //statements } The condition specifies which expression is to be evaluated. If the condition is true,the statements in curly brackets are executed. If statement: Use relational

/ 1 min read

Assignment Operators and Increment Operator of C++

Assignment Operator: The simple assignment operator (=) assigns the right side to left side. C++ provides shorthand operators that have the capability of performing an operation and an assignment at the same time. For example: int x=5; x+=3; //It's mean x=x+3 x-=

Load More