Arjun Thakur has Published 1109 Articles

strcat() vs strncat() in C++

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 10:49:31

551 Views

Both strcat() and strncat() are predefined string functions in C++. Details about these are given as follows.strcat()This function is used for concatenation. It appends a copy of the source string at the end of the destination string and returns a pointer to the destination string. The syntax of strcat() is ... Read More

C++ Program to Store and Display Information Using Structure

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 09:55:46

7K+ 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 employee {    int empID;    char name[50];   ... Read More

C++ Program to Check Multiplicability of Two Matrices

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 09:50:27

248 Views

Two matrices are said to be multiplicable if they can be multiplied. This is only possible if the number of columns of the first matrix is equal to the number of rows of the second matrix. For example.Number of rows in Matrix 1 = 3 Number of columns in Matrix ... Read More

C++ Program to Remove all Characters in a String Except Alphabets

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 09:44:44

582 Views

A string is a one-dimensional character array that is terminated by a null character. It may contain characters, digits, special symbols etc.A program to remove all characters in a string except alphabets is given as follows.Example#include using namespace std; int main() {    char str[100] = "String@123!!";    int ... Read More

C++ Program to Find Factorial of a Number using Recursion

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 09:42:22

12K+ Views

Factorial of a non-negative integer n is the product of all the positive integers that are less than or equal to n.For example: The factorial of 4 is 24.4! = 4 * 3 * 2 *1 4! = 24The factorial of an integer can be found using a recursive program ... Read More

How do we add a push button to HTML?

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 08:44:50

2K+ Views

Use the tag in HTML to add a push button. The HTML tag is used for creating a button within HTML form. You can also use tag to create similar buttons.The following are the attributes of the tag −AttributeValueDescriptionautofocusAutofocusSpecifies that the button should have input focus ... Read More

Fade in on Button hover with CSS

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 08:31:03

748 Views

You can try to run the following code to fade in on button hover with CSSExampleLive Demo                    .btn {             background-color: orange;             color: white;             padding: 10px;             text-align: center;             font-size: 16px;             margin: 5px;             opacity: 0.5;             transition: 0.5s;             display: inline-block;             text-decoration: none;             cursor: pointer;          }          .btn:hover {             opacity: 2          }                     Result    

Center an image with CSS

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 07:24:59

185 Views

To center an image, use the margin-left, margin-right and block CSS properties. You can try to run the following code to center an imageExampleLive Demo                    img {             border: 2px solid orange;             border-radius: 3px;             padding: 7px;          }          img {             display: block;             margin-left: auto;             margin-right: auto;             width: 50%;          }                        

Selects every

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 07:12:49

2K+ Views

Use the element ~ element selector to select elements preceded by element. You can try to run the following code to implement thisExampleLive Demo                    p~ul {             color: white;             background-color: blue;          }                     Demo Website       Fruits                Vegetables are good for health.                       Spinach             Onion             Capsicum                       Fruits are good for health.                Apple          Orange          Kiwi          

Create a tooltip that appears when the user moves the mouse over an element with CSS

Arjun Thakur

Arjun Thakur

Updated on 24-Jun-2020 06:53:17

299 Views

You can try to run the following code to create a tooltip visible on mouse over. Use the visibility propertyExampleLive demo           #mytooltip #mytext {          visibility: hidden;          width: 100px;          background-color: black;     ... Read More

Advertisements