Chandu yadav has Published 1163 Articles

expm1() in C++

Chandu yadav

Chandu yadav

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

36 Views

The function expm1() is used to calculate the exponential raised to the power of any number minus one. It returns the value of (exponential raised to the power of a) - 1.Here is the mathematical expression of expm1(), expm1(a) = (e^a) - 1Here is the syntax of expm1() in C++ ... Read More

How do malloc() and free() work in C/C++?

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 10:05:44

2K+ Views

malloc()The function malloc() is used to allocate the requested size of bytes and it returns a pointer to the first byte of allocated memory. It returns null pointer, if it fails.Here is the syntax of malloc() in C language, pointer_name = (cast-type*) malloc(size);Here, pointer_name  − Any name given to the ... Read More

Usage of CSS visibility property

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 09:56:20

148 Views

A property called visibility allows you to hide an element from view. You can use this property along with JavaScript to create very complex menu and very complex webpage layouts.The visibility property can take the values listed in the table that followsValueDescriptionvisibleThe box and its contents are shown to the user.hiddenThe ... Read More

Android AsyncTask example and explanation

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 09:50:51

12K+ Views

Android AsyncTask going to do background operation on background thread and update on main thread. In android we cant directly touch background thread to main thread in android development. asynctask help us to make communication between background thread to main thread.Methods of AsyncTaskonPreExecute() − Before doing background operation we should ... Read More

What is the difference between printf() and cout in C++?

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 09:47:49

2K+ Views

printf()This is mainly used in C language. It is a formatting function that prints to the standard out. It prints to the console and takes a format specifier to print. It returns an integer value. It is not type safe in input parameters. It can be used in C++ language ... Read More

Convert a C++ String to Upper Case

Chandu yadav

Chandu yadav

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

551 Views

Here is the program to convert a string to uppercase in C++ language,Example Live Demo#include #include using namespace std; int main() {    char s[30] = "This_is_string";    int i;    for(i=0;i=97 && s[i]

Reverse a string in C/C++

Chandu yadav

Chandu yadav

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

1K+ Views

Here is an example to reverse a string in C language, Example#include #include int main() {    char s[50], t;    int i = 0, j = 0;    printf("Enter the string to reverse :");    gets(s);    j = strlen(s) - 1;    while (i ... Read More

Control how letters are spaced in CSS

Chandu yadav

Chandu yadav

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

45 Views

Use the font-kerning property to control how letters placed on a web page. You can try to run the following code to implement the font-kerning propertyExampleLive Demo                    #demo {             font-kerning: normal;          }                     This is demo text.    

C++ Program to Calculate Difference Between Two Time Period

Chandu yadav

Chandu yadav

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

2K+ Views

There are two time periods provided in the form of hours, minutes and seconds. Then their difference is calculated. For example −Time period 1 = 8:6:2 Time period 2 = 3:9:3 Time Difference is 4:56:59A program that calculates the difference between two time periods is given as follows −Example Live Demo#include ... Read More

C++ Program to Add Complex Numbers by Passing Structure to a Function

Chandu yadav

Chandu yadav

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

603 Views

Complex numbers are numbers that are expressed as a+bi where i is an imaginary number and a and b are real numbers. Some examples on complex numbers are −2+5i 3-9i 8+2iA program to add complex numbers by passing structure to a function is given as follows −Example Live Demo#include ... Read More

Advertisements