George John has Published 1167 Articles

islessgreater() in C/C++

George John

George John

Updated on 25-Jun-2020 09:40:25

162 Views

The function islessgreater() is used to check that first argument is less than or greater than the second one. It is declared in “math.h” header file in C language. It returns true, if successful otherwise false.Here is the syntax of islessgreater() in C++ language, bool islessgreater(value1 , value2);Here, value1 − ... Read More

Character arithmetic in C

George John

George John

Updated on 25-Jun-2020 09:33:55

4K+ Views

Character arithmetic is used to implement arithmetic operations like addition and subtraction on characters in C language. It is used to manipulate the strings. When the characters are used with the arithmetic operations, it converts them into integer value automatically i.e. ASCII value of characters.Here is an example of character ... Read More

C++ Program to Swap Numbers in Cyclic Order Using Call by Reference

George John

George John

Updated on 25-Jun-2020 09:26:39

947 Views

Three numbers can be swapped in cyclic order by passing them to a function cyclicSwapping() using call by reference. This function swaps the numbers in a cyclic fashion.The program to swap numbers in cyclic order using call by reference is given as follows −Example Live Demo#include using namespace std; void cyclicSwapping(int ... Read More

Usage of radial-gradient() CSS function

George John

George John

Updated on 25-Jun-2020 09:26:23

107 Views

Set a radial gradient as the background image, with radial-gradient() CSS function. You can try to run the following code to implement linear-gradient() function in CSSExampleLive Demo                    #demo {             height: 200px;             background: radial-gradient(green, orange, maroon);          }                     Setting background as radial gradient.          

getchar_unlocked() in C

George John

George John

Updated on 25-Jun-2020 09:16:19

272 Views

The function getchar_unlocked() is deprecated in Windows because it is a thread unsafe version of getchar(). It is suggested not to use getchar_unlocked(). There is no stream lock check that’s why getchar_unlocked is unsafe. The function getchar_unlocked() is faster than getchar().Here is the syntax of getchar_unlocked() in C language, int ... Read More

C++ Program to Add Two Distances (in inch-feet) System Using Structures

George John

George John

Updated on 25-Jun-2020 09:10:59

581 Views

A structure is a collection of items of different data types. It is very useful in creating complex data structures with different data type records. A structure is defined with the struct keyword.An example of a structure is as follows −struct DistanceFI {    int feet;    int inch; };The ... Read More

strstr() in C++

George John

George John

Updated on 25-Jun-2020 09:04:00

1K+ Views

The strstr() function is a predefined function in string.h. It is used to find the occurance of a substring in a string. This process of matching stops at ‘\0’ and does not include it.Syntax of strstr() is as follows −char *strstr( const char *str1, const char *str2)In the above syntax, ... Read More

Specify the size of the rows in a CSS grid layout

George John

George John

Updated on 25-Jun-2020 09:00:09

118 Views

Use the grid-template-rows property to set the number of rows in a grid layoutExampleLive Demo                    .container {             display: grid;             background-color: green;             grid-template-rows: auto auto;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: orange;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }          .ele1 {             grid-row-start: 1;             grid-row-end: 6;          }                     Game Board                1          2          3          4          5          6          

C++ Program to Find GCD of Two Numbers Using Recursive Euclid Algorithm

George John

George John

Updated on 25-Jun-2020 08:48:58

5K+ Views

The Greatest Common Divisor (GCD) of two numbers is the largest number that divides both of them.For example: Let’s say we have two numbers that are 63 and 21.63 = 7 * 3 * 3 21 = 7 * 3So, the GCD of 63 and 21 is 21.The recursive Euclid’s ... Read More

C++ Program to Convert Octal Number to Binary Number

George John

George John

Updated on 25-Jun-2020 08:36:10

1K+ Views

In a computer system, the binary number is expressed in the binary numeral system while the octal number is in the octal numeral system. The binary number is in base 2 while the octal number is in base 8.Examples of binary numbers and their corresponding octal numbers are as follows ... Read More

Advertisements