
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

8K+ Views
Unary operators are operators that operate only on a single operand (unlike binary operators, which operate on two operands). There are mainly thirteen unary operators that exist in C++, for example, ++, !, ~, typeof, delete, etc. Overloading Unary Minus Operator Overloading a unary operator means defining a custom behavior for the unary operators while applying it to objects of a class. which means you can define how an operator will work when applied to instances of a class instead of using its default behavior. This operator is normally used on the left side of the object, as in +obj, ... Read More

8K+ Views
The term Whitespace in C++ refers to the characters used for formatting, like creating spaces, tabs, and newlines. These are usually invisible in the source code output (meaning they don't appear in the actual program output); they just help to format the code and improve readability. Types of whitespace characters Here are the following four common types of whitespace characters mostly used in C++. Space (' ') Tab ('\t') Newline ('') Carriage return ('\r') Space (' ') It's a most basic whitespace ... Read More

11K+ Views
Converting a for loop to a while loop in Python means rewriting the loop logic in a different way to perform the same task.While loop gives better control over conditions and is also useful for cases when the number of iterations is not fixed and depends on runtime values. Therefore, sometimes while is preferred over a for loop when the loop's continuation depends on dynamic conditions. For Loop Code Here is the following simple for loop that traverses over a range. for x in range(5): print(x) Output 0 1 2 3 4 To convert ... Read More

2K+ Views
In this article, we will learn to print Hello World without a semicolon in C++. The semicolon (;) is used to terminate statements. The above can be achieved by using control structures like loops, conditionals, or function calls. Different Approaches There are multiple ways to write a C++ program without semicolons − Using if Statements Using a while Loop Using Switch Statement Note: Doing this is a very bad practice and should never be used in real code. This is presented just as informational content. ... Read More

3K+ Views
In python the while loop needs to be controlled by making some provision inside the body of the loop to drive the condition mentioned in the beginning to false. This is usually done by keeping count of iterations. If the while loop condition never evaluates to False, then we will have an infinite loop, which is a loop that never stops automatically, in this case we need to interrupt externally. count=0 while condition: stmt1 stmt2 . . count=count+1 Example Let’s take an example and ... Read More

3K+ Views
In C++, a semicolon(;) indicates the end of a statement in code, or we can say it terminates the statement. When you use a semicolon just after an if or while statement, it creates an empty statement, which executes nothing. Semicolon with If Statement In C++, the if statement is a conditional statement that runs only if the condition is true, where {} braces are used to write the condition inside them. But if you use a semicolon just after the if statement, it will still check the condition, but it controls just an empty operation; therefore, nothing will happen ... Read More

347 Views
Unary operator are operators that act upon a single operand to produce a new value. The unary operators are as follows −Indirection operator (*) - It operates on a pointer variable, and returns an l-value equivalent to the value at the pointer address. This is called "dereferencing" the pointer.Address-of operator (&) - The unary address-of operator (&) takes the address of its operand. The operand of the address-of operator can be either a function designator or an l-value that designates an object that is not a bit field and is not declared with the register storage-class specifier.Unary plus operator (+) - ... Read More

10K+ Views
A reserved word is a word that cannot be used as an identifier, such as the name of a variable, function, or label – it is "reserved from use". This is a syntactic definition, and a reserved word may have no meaning.There are a total of 95 reserved words in C++. The reserved words of C++ may be conveniently placed into several groups. In the first group, we put those that were also present in the C programming language and have been carried over into C++. There are 32 of these. There are another 30 reserved words that were not in ... Read More