Author: admin
-
Break Statement in C
The break statement in C is used in two different contexts. In switch-case, break is placed as the last statement of each case block. The break statement may also be employed in the body of any of the loop constructs (while, do–while as well as for loops). When used inside a loop, break causes the loop to be terminated. In the switch-case statement, break takes the control out of the switch scope after…
-
Infinite Loop
In C language, an infinite loop (or, an endless loop) is a never-ending looping construct that executes a set of statements forever without terminating the loop. It has a true condition that enables a program to run continuously. Flowchart of an Infinite Loop If the flow of the program is unconditionally directed to any previous step, an infinite loop…
-
Nested Loops in C
In the programming context, the term “nesting” refers to enclosing a particular programming element inside another similar element. For example, nested loops, nested structures, nested conditional statements, etc. Nested Loops When a looping construct in C is employed inside the body of another loop, we call it a nested loop (or, loops within a loop). Where, the loop that…
-
Do-While Loop in C
The do-while loop is one of the most frequently used types of loops in C. The do and while keywords are used together to form a loop. The do-while is an exit-verified loop where the test condition is checked after executing the loop’s body. Whereas the while loop is an entry-verified. The for loop, on the other hand, is an automatic loop. Syntax of do while Loop The syntax of do-while…
-
Node.js Command Line Options
There is a wide variety of command line options in Node.js. These options provide multiple ways to execute scripts and other helpful run-time options. Let’s see the list of Node.js command line options: Index Option Description 1. v, –version It is used to print node’s version. 2. -h, –help It is used to print node…
-
For Loop in C
Most programming languages including C support the for keyword for constructing a loop. In C, the other loop-related keywords are while and do-while. Unlike the other two types, the for loop is called an automatic loop, and is usually the first choice of the programmers. The for loop is an entry-controlled loop that executes the statements till the given condition. All the elements (initialization, test…
-
Node.js Package Manager
Node Package Manager provides two main functionalities: The npm comes bundled with Node.js installables in versions after that v0.6.3. You can check the version by opening Node.js command prompt and typing the following command: Installing Modules using npm Following is the syntax to install any Node.js module: Let’s install a famous Node.js web framework called…
-
Node.js REPL
The term REPL stands for Read Eval Print and Loop. It specifies a computer environment like a window console or a Unix/Linux shell where you can enter the commands and the system responds with an output in an interactive mode. REPL Environment The Node.js or node come bundled with REPL environment. Each part of the REPL environment has…
-
While Loop
In C, while is one of the keywords with which we can form loops. The while loop is one of the most frequently used types of loops in C. The other looping keywords in C are for and do-while. The while loop is often called the entry verified loop, whereas the do-while loop is an exit verified loop. The for loop, on the other hand, is an automatic loop. Syntax of C while…
-
Node.js Console
The Node.js console module provides a simple debugging console similar to JavaScript console mechanism provided by web browsers. There are three console methods that are used to write any node.js stream: Node.js console.log() The console.log() function is used to display simple message on console. File: console_example1.jsPauseNextMute Current Time 0:01 / Duration 18:10 Loaded: 3.30%  Fullscreen Open Node.js command…