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…

  • let Statement

    What is JavaScript let statement? The JavaScript let statement is used to declare a variable. With the let statement, we can declare a variable that is block-scoped. This mean a variable declared with let is only accessible within the block of code in which it is defined. The let keyword was introduced in the ES6 (2015) version of JavaScript. It is an…

  • Variables

    JavaScript Variables JavaScript variables are used to store data that can be changed later on. The ariables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container. Before you use a variable in a JavaScript program, you must declare it.…

  • Comments

    JavaScript Comments JavaScript comments are used to explain the purpose of the code. The comments are not executed as a part of program and these are solely meant for human developers to understand the code better. You can use comments for various purposes, such as − A good developer always writes a comment to explain the code.…

  • Console.log()

    JavaScript console.log() method The console.log() is one of the most important methods in JavaScript. It is used to print the message in the web console. We can use the console.log() method to debug the code by printing the output in the console. For example, if the developer requests API and wants to check the data…

  • 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…

  • 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…

  • 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…