Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Sunidhi Bansal
Page 47 of 81
is_abstract template in C++
In this article we will be discussing the working, syntax and examples of std::is_abstract template in C++ STL.Is_abstract template helps to check whether the class is an abstract class or not.What is an abstract class?Abstract class is a class which has at least one Pure Virtual Function. We use Abstract classes because when we define the function, we don’t know its implementation, so it is very helpful in the case when we don't know what the function of a class is supposed to do further but we are sure that there must be a function like this in our system. ...
Read Morenearbyint() function in C++
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 Moreis_arithmetic Template in C++
In this article we will be discussing the working, syntax and examples of std::is_arithmetic template in C++ STL.is_arithmetic template helps to check whether the given class T is of arithmetic type or not.What is an Arithmetic Type?Arithmetic type consists of two types, that areintegral types − In this we define the whole numbers. The following are the type of integral types −charboolintlongshortlong longwchar_tchar16_tchar32_tfloating point types − These can hold fractional parts. The following are the type of floating point.FloatDoubleLong doubleSo, template is_arithmatic checks the defined type T is an arithmetic type or not and returns true or false accordingly.Syntaxtemplate ...
Read Morescalbn() function in C++
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 Moremktime() function in C++ STL
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 Moreis_scalar template in C++
In this article we will be discussing the working, syntax and examples of std::is_scalar template in C++ STL.is_scalar is a template which comes under header file. This template is used to check whether the given type T is a scalar type or notThis template is a combination of is_arithmetic, is_pointer, is_enum, is_member_pointer or is_same and checks whether either if either one is true, the result of is_scalar will also be true.What is a scalar type in C++?A scalar type is that object which is neither a class type nor an array type. A scalar type is a type which ...
Read Moreis_trivial function in C++
In this article we will be discussing the working, syntax and examples of std::is_trivial template in C++ STL.is_trivial is a template which comes under header file. This template is used to check whether the given type T is a trivial class or notWhat is a trivial class type in C++?We say a type as a Trivial type, when its data is stored in a contiguous manner and which accepts only static default initialization. It can include arrays of any type, classes and scalar type.Trivial class is a class which is trivially default constructed and trivially copyable. There are some ...
Read Moreputwchar() function in C/C++
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 Morequick_exit() function in C++ with Examples
In this article we will be discussing the working, syntax and examples of quick_exit() function in C++ STL.What is quick_exit()?quick_exit() function is an inbuilt function in C++ STL, which is defined in the header file. quick_exit() function is used to quickly terminate the calling process means it terminates the process without cleaning of its resources.This function is used for normal termination and no additional cleanup tasks are being performed like, no object destructors are called, whereas the C streams are closed or flushed, the files which are opened with tmpfile are being removed.When we terminate a process using quick_exit() ...
Read Moreis_polymorphic template in C++
In this article we will be discussing the working, syntax and examples of std::is_polymorphic template in C++ STL.is_polymorphic is a template that comes under the header file in C++. This template is used to check whether the class is a polymorphic class or not and return the result either true or false accordingly.What is a polymorphic class?A class which declares the virtual function from an abstract class where the virtual function is declared. This class have the declaration of the virtual function declared in other class.Syntaxtemplate is_polymorphic;ParametersThe template can have only parameter of type T, and check whether ...
Read More