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
Programming Articles - Page 1995 of 3366
712 Views
In this article we will be discussing the working, syntax and examples of mktime() function in C++ STL.What is mktime()?mktime() function is an inbuilt function in C++ STL, which is defined in the header file. mktime() function is used to convert the local time to and object time_t.This function is like the reverse of the function localtime(), which converts an input to the local timezone of the machine.This function automatically modifies the values of the member timeptr if they are off the range or there is tm_day and tm_yday which are not allowed.Syntaxtime_t mktime( struct tm* tptr );ParametersThe function ... Read More
96 Views
In this article we will be discussing the working, syntax and examples of scalbn() function in C++ STL.What is scalbn()?scalbn() function is an inbuilt function in C++ STL, which is defined in the header file. scalbn() function is used to scale significantly using the floating point base exponent.Significand is a part of a floating-point number consisting of its significant digits, depending upon the interpretation of the exponent significand can be an integer or a fraction.The function calculates the product of num and FLT_RADIX to the power n, where FLT_RADIX is the base of all floating point data types and ... Read More
80 Views
In this article we will be discussing the working, syntax and examples of nearbyint() function in C++ STL.What is nearbyint()?nearbyint() function is an inbuilt function in C++ STL, which is defined in header file. nearbyint() function is used to get the round integral value as per the input.The function rounds off the input to get a nearest integral value, the round method is described by fegetround.This function accepts the float, double, and long double type values, as arguments.Syntaxdouble nearbyint(double num); float nearbyint(float num); long double nearbyint(long double num);ParametersThe function accepts following parameter(s) −num − The value which is to ... Read More
562 Views
VarHandle is a reference to a variable, and it provides access to variables under various access modes (such as plain read/write, volatile read/write, and compare-and-swap), similar to the functionality provided by java.util.concurrent.atomic and sun.misc.Unsafe. The variables can be array elements, instance or static fields in a class.In the below example, we can create a static variable handle.Exampleimport java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; public class StaticVarHandleTest { static int field; static int[] array = new int[20]; static final VarHandle FIELD, ARRAY; static { try { ... Read More
1K+ Views
In this article we will be discussing the working, syntax and examples of norm() function in C++ STL.What is norm()?norm() function is an inbuilt function in C++ STL, which is defined in header file. norm() function is used to get the norm value of a complex number.Norm value of a complex number is the squared magnitude of a number. So in simple words the function finds the squared magnitude of a complex number, including its imaginary and real number.Syntaxdouble norm(ArithmeticType num);ParametersThe function accepts following parameter(s) −num − The complex value which we want to work on.Return valueThis function returns ... Read More
311 Views
In this article we will be discussing the working, syntax and examples of valarray::max() function in C++ STL.What is a valarray?std::valarray is a class which is used for representing, modifying the array of values, which supports elements-wise mathematical operations.What is valarray::max()?std::valarray::max() function is an inbuilt function in C++ STL, which is defined in header file. This function returns the maximum value which is in the valarray container.If the valarray is empty then the result which is returned is unspecified.SyntaxV_array_name.max();ParametersThe function accepts no parameter(s) −Return valueThis function returns the maximum value of the valarray.ExampleInputvalarray arr = { 1, 2, 4, ... Read More
254 Views
In this article we will be discussing the working, syntax and examples of localtime() function in C++ STL.What is localtime()?localtime() function is an inbuilt function in C++ STL, which is defined in the header file. localtime() is used to convert the given time into the local time.This function uses a value referred by the timer and fill the value of the structure and it converts the value into the given local timezoneSyntaxlocaltime(time_t *timer);ParametersThe function accepts the following parameter(s) −timer − It is a pointer to objects which have the time_t type value.Return valueThis function returns a pointer pointing to ... Read More
172 Views
In this article we will be discussing the working, syntax and examples of std::exp2() function for complex numbers in C++ STL.What is std::exp2()?std::exp2() function for complex numbers is an inbuilt function in C++ STL, which is defined in or header file. exp2() function is used for computing the binary exponential function that is the base-2 exponential function of a given number.This function returns either double, float or long double value which is .Syntaxexp2(double n); exp2(float n); exp2(long double n);ParametersThe function accepts the following parameter(s) −n − It is a value of the exponent.Return valueThis function returns the base-2 ... Read More
787 Views
In this article we will be discussing the working, syntax and examples of std::exp() function for complex numbers in C++ STL.What is std::exp()?std::exp() function for complex numbers is an inbuilt function in C++ STL, which is defined in a header file. exp() function for complex numbers is the same like the normal exp() which is also an inbuilt function, defined in header file, used to find the exponential value of the input.This function is exponential of the complex number and returns the exponential of the complex number.Syntaxexp(complex num);ParametersThe function accepts the following parameter(s) −num − It is ... Read More
152 Views
In this problem, we are given a linked list with a value, link pointer and an arbitrary pointer. Our task is to make the arbitrary pointer point to point the largest value which is on the right side of it in the linked list.Let’s take an example to understand the problem, Here, we can see the following arbitrary pointers of the linked list, which points to the greatest elements on the right side of the linked list.12 -> 76, 76 -> 54, 54 -> 8, 8 -> 41To solve this problem, we need to find the greatest element to the ... Read More