putwchar Function in C/C++

Sunidhi Bansal
Updated on 17-Apr-2020 09:58:18

124 Views

In this article we will be discussing the working, syntax and examples of putwchar() function in C++ STL.What is putwchar()?putwchar() function is an inbuilt function in C++ STL, which is defined in the header file. putwchar() function is used to write the wide character on the standard output device. This function takes the wide character from the arguments and writes it on the stdout or standard output of the system.This function is a wide character version of putchar() which is defined in the header file.Syntaxputwchar( wchar_t widec );ParametersThe function accepts following parameter(s) −widec − The wide character which ... Read More

mbrtoc32 in C/C++ with Examples

Sunidhi Bansal
Updated on 17-Apr-2020 09:54:48

224 Views

In this article we will be discussing the working, syntax and examples of std::mbrtoc32() function in C++ STL.What is std::mbrtoc32()?std::mbrtoc32() function is an inbuilt function in C++ STL, which is defined in header file. This function is used to convert a narrow multibyte character to UTF-32-character representation.If the associated character pointer is not null, and all other parameters are also accepted then it will convert the corresponding 32-bit character.Syntaxsize_t mbrtoc32( char32_t* pc32, char* str, size_t n, mbstate_t* ps);ParametersThe function accepts following parameter(s) −pc32 − This is the pointer to the location we want the output to be stored.str − ... Read More

mbrtoc16 in C/C++ with Examples

Sunidhi Bansal
Updated on 17-Apr-2020 09:52:41

319 Views

In this article we will be discussing the working, syntax and examples of std::mbrtoc16() function in C++ STL.What is std::mbrtoc16()?std::mbrtoc16() function is an inbuilt function in C++ STL, which is defined in header file. This function is used to convert a narrow multibyte character to UTF-16-character representation.If the associated character pointer is not null, and all other parameters are also accepted then it will convert the corresponding 16-bit character.Syntaxsize_t mbrtoc16( char16_t* pc16, char* str, size_t n, mbstate_t* ps);ParametersThe function accepts following parameter(s) −pc16 − This is the pointer to the location we want the output to be stored.str − ... Read More

mbsrtowcs Function in C/C++

Sunidhi Bansal
Updated on 17-Apr-2020 09:35:08

182 Views

In this article we will be discussing the working, syntax and examples of std::mbsrtowcs() function in C++ STL.What is std::mbsrtowcs()?std::mbsrtowcs() function is an inbuilt function in C++ STL, which is defined in the header file. mbsrtowcs() means that it converts the null terminated multibyte character string whose first byte is *src to its wide character representation. This function returns the value according to the conversion.Syntaxsize_t mbsrtowcs( wchar_t* pwc, char** str, size_t n, mbstate_t* ps);ParametersThe function accepts following parameter(s) −pwc − This is the pointer to the location we want the output to be stored.str − Character string which is ... Read More

memcpy in C/C++

Sunidhi Bansal
Updated on 17-Apr-2020 09:30:22

3K+ Views

In this article we will be discussing the working, syntax and examples of memcpy() function in C++ STL.What is memcpy()?memcpy() function is an inbuilt function in C++ STL, which is defined in header file. memcpy() function is used to copy blocks of memory. This function is used to copy the number of values from one memory location to another.The result of the function is a binary copy of the data. This function doesn’t check for any terminating source or any terminating null character, it just copies the num bytes from the source.Examplevoid memcpy( void* destination, void* source, size_t num);ParametersThe ... Read More

mktime Function in C++ STL

Sunidhi Bansal
Updated on 17-Apr-2020 09:28:11

708 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

Create Static VarHandle in Java 9

raja
Updated on 17-Apr-2020 09:28:06

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

scalbn Function in C++

Sunidhi Bansal
Updated on 17-Apr-2020 09:26:42

91 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

Nearbyint Function in C++

Sunidhi Bansal
Updated on 17-Apr-2020 09:22:48

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

Norm Function in C++ with Examples

Sunidhi Bansal
Updated on 17-Apr-2020 09:20:54

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

Advertisements