Arushi has Published 157 Articles

How to create a string from a Java Array?

Arushi

Arushi

Updated on 20-Feb-2020 04:49:12

292 Views

You can convert an array of Strings to a single array using the collect() method.ExampleLive Demoimport java.util.Arrays; import java.util.stream.Collectors; public class CreatngStringFromArray {    public static void main(String args[]) {       String [] myArray = {"Welcome", "to", "Tutorialspoint"};       String str = Arrays.stream(myArray).collect(Collectors.joining(" ")); ... Read More

Variables, their types, and Scope in C++

Arushi

Arushi

Updated on 11-Feb-2020 10:06:35

181 Views

Each variable in C++ has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. We declare a variable using the notation −type variableName;The ... Read More

How to define constants in C++?

Arushi

Arushi

Updated on 11-Feb-2020 08:08:30

523 Views

You can define constants in C++ by adding the const qualifier before the declaration of the variable. Example#include using namespace std; int main() {    const int x = 9;    x = 0;    return 0; }This will define the constant variable x. But it will throw an error ... Read More

What is the relation between auto and decltype in C++?

Arushi

Arushi

Updated on 11-Feb-2020 07:59:34

794 Views

Auto and decltype serve different purposes so they don't map one-to-one. auto is a keyword in C++11 and later that is used for automatic type deduction. The decltype type specifier yields the type of a specified expression. Unlike auto that deduces types based on values being assigned to the variable, ... Read More

How can I customize value, instead of NULL, of a row by using MySQL IF() function?

Arushi

Arushi

Updated on 11-Feb-2020 06:18:34

44 Views

Suppose in our ‘Employee’ table we are having NULL as the value of ‘salary’ column for two employees. The data, shown as follows, is itself not meaningful.mysql> Select * from employee; +----+--------+--------+ | ID | Name   | Salary | +----+--------+--------+ | 1 | Gaurav  | 50000  | | 2 ... Read More

What is C++ Standard Error Stream (cerr)?

Arushi

Arushi

Updated on 10-Feb-2020 13:41:41

4K+ Views

std::cerr is an object of class ostream that represents the standard error stream oriented to narrow characters (of type char). It corresponds to the C stream stderr. The standard error stream is a destination of characters determined by the environment. This destination may be shared by more than one standard ... Read More

How to Install C++ Compiler on Windows?

Arushi

Arushi

Updated on 10-Feb-2020 12:09:05

5K+ Views

There are several alternatives for compiling C++ on windows. Let's look at 2 of them:GCCTo install GCC on Windows you need to install MinGW. To install MinGW, go to the MinGW homepage, www.mingw.org, and follow the link to the MinGW download page. Download the latest version of the MinGW installation ... Read More

What are Standard Libraries in C++?

Arushi

Arushi

Updated on 10-Feb-2020 11:02:06

408 Views

In the C++ programming language, the C++ Standard Library is a collection of classes and functions, which are written in the core language and part of the C++ ISO Standard itself. The C++ Standard Library provides several generic containers, functions to utilize and manipulate these containers, function objects, generic strings ... Read More

What is the resemblance of COALESCE() function with IF-THEN-ELSE statement?

Arushi

Arushi

Updated on 10-Feb-2020 08:12:53

399 Views

As we know that COALESCE() function returns first non-NULL value from the list of values. The following IF-THEN-ELSE statement is equivalent to COALESCE() function.IF value1 is not NULL THEN output = value1; ELSIF value2 is not NULL THEN output = value2; ELSIF value3 is not NULL THEN output = value3; ... Read More

What is the difference between “lang” and “type” attributes in a script tag?

Arushi

Arushi

Updated on 12-Sep-2019 08:31:25

149 Views

JavaScript lang attributeThis attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.JavaScript type attributeThis attribute is what is now recommended to indicate the scripting language in use and ... Read More

Previous 1 ... 5 6 7 8 9 ... 16 Next
Advertisements