
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
Yash Sanghvi has Published 220 Articles

Yash Sanghvi
8K+ Views
The modulo operator in Arduino is exactly the same as in C language, or most other languages for that matter. The operator is %. The syntax is: a % b and it returns the remainder when a is divided by b.ExampleThe following example illustrates the use of this operator −void ... Read More

Yash Sanghvi
750 Views
The isSpace() and isWhitespace() functions can be used to check if a character is a space or, more specifically, a whitespace. Whitespace is a subset of space. While whitespace includes only space and horizontal tab (‘\t’), space includes form feed (‘\f’), new line (‘’), carriage return (‘\r’) and even vertical ... Read More

Yash Sanghvi
278 Views
Just like there is a function to check if a character is alphanumeric or not, there is another one to check if a character is a punctuation mark or not. The name of the function is isPunct(). It takes a character as an input and returns a Boolean: true if the ... Read More

Yash Sanghvi
799 Views
Depending on your use case, you may need to check if a character is alphanumeric or not in Arduino. One example can be validating password strings, wherein you’ve allowed only alphanumeric characters for passwords. Or checking file names for storage in SD Card (sometimes some special characters are not allowed ... Read More

Yash Sanghvi
2K+ Views
Just like other bitwise operators, bitwise XOR also applies on the corresponding bits individually.The operator is ^ and the syntax is, a ^ bwhere a and b are the two numbers to be XORed.The truth table for XOR is given below −PQP^Q000011101110As you can see, the XOR operator returns 1 ... Read More

Yash Sanghvi
3K+ Views
Logical NOT is performed using the ! operator. The truth table is given below −ExpressionOutputTFFTAs you can see, the logical NOT inverts the truth value of the expression.ExampleThe usage can be understood from the example given below −void setup() { // put your setup code here, to run once: ... Read More

Yash Sanghvi
1K+ Views
Unlike logical NOT, which inverts the truth value of an expression, the bitwise NOT applies to each bit of a number and inverts its value (0 to 1 and 1 to 0). The operator is ~.The syntax thus is ~a, where a is the number on which this operator has ... Read More

Yash Sanghvi
14K+ Views
The logical AND is denoted by the && operator, while the logical OR is denoted by the || operator.SyntaxExpression1 && Expression2ORExpression1 || Expression2Where expression1 and expression2 evaluate to Boolean values (true or false). The output of these statements is determined by the truth tables of logical AND and OR.The truth ... Read More

Yash Sanghvi
10K+ Views
In order to get the max/ min values of an array in Arduino, we can run a simple for loop. Two implementations are shown below. One uses the max() and min() functions of Arduino, and the other uses the > and < operators.The max and min functions have the following ... Read More

Yash Sanghvi
5K+ Views
The pow() function of Arduino can be used for evaluating exponential expressions. Any expression of the form ab can be expressed as pow(a, b). For example 23 becomes pow(2, 3).The type for both the base (a) and the exponent (b) is float. This function returns a double.Examplevoid setup() { ... Read More