How to get the arccosine (in radians) of a number in JavaScript?

Ankitha Reddy
Published on 16-Feb-2018 06:33:15
To get the arccosine (in radians) of a number, use the Math.acos() method. This method returns the arccosine in radians of a number. The acos() method returns a numeric value between 0 and pi radians for x between -1 and 1. If the value of a number is outside this ... Read More

How do we initialize a variable in C++?

karthikeya Boyini
Published on 16-Feb-2018 06:30:14
You can initialize a variable using the assignment operator or use its constructor when initializing it. For example, int i = 0; MyClass instance(1, "Hello");It will be automatically initialized ifIt's a class/struct instance in which the default constructor initializes all primitive types; like MyClass instance; You use array initializer syntax, e.g. ... Read More

How to get the square root of 2 in JavaScript?

Abhinaya
Published on 16-Feb-2018 06:24:38
To get the square root of 2, use the JavaScript Math SQRT2 property. It returns the square root of 2 which is approximately 1.414.ExampleYou can try to run the following code to get the square root of 2 in JavaScript −<html>    <head>       <title>JavaScript Math SQRT2 Property</title> ... Read More

How to get the value of PI in JavaScript?

Govinda Sai
Published on 16-Feb-2018 06:21:16
To get the value of PI in JavaScript, use the Math.PI property. It returns the ratio of the circumference of a circle to its diameter, which is approximately 3.14159.ExampleYou can try to run the following code to get the value of PI in JavaScript −<html>    <head>       ... Read More

What is type deduction in C++?

Vikyath Ram
Published on 16-Feb-2018 06:28:20
Type inference or deduction refers to the automatic detection of the data type of an expression in a programming language. It is a feature present in some strongly statically typed languages. In C++, the auto keyword(added in C++ 11) is used for automatic type deduction. For example, you want to ... Read More

What does a semicolon do after a C++ class name?

Swarali Sree
Published on 16-Feb-2018 06:20:04
If you have statements like −Class Person;This is a forward declaration. It lets the following code know that there is are classes with the name Person. This satisfies the compiler when it sees these names used. Later the linker will find the definition of the classes.

How to get base 10 logarithms of E in JavaScript?

Ramu Prasad
Published on 16-Feb-2018 06:17:46
To get base 10 logarithms of E, use the Math LOG10E property. It returns base 10 logarithm of E which is approximately 0.434.ExampleYou can try to run the following code to get base 10 logarithms of E in JavaScript −<html>    <head>       <title>JavaScript Math LOG10E Property</title>   ... Read More

How to get base 2 logarithm of E in JavaScript?

Sravani S
Published on 16-Feb-2018 06:14:42
To get base 2 logarithms of E, use the Math LOG2E property. It returns base 2 logarithm of E which is approximately 1.442.ExampleYou can try to run the following code to get base 2 logarithms of E in JavaScript:<html>    <head>       <title>JavaScript Math LOG2E Property</title>    </head> ... Read More

How to get Natural logarithm of 10 in JavaScript?

V Jyothi
Published on 16-Feb-2018 06:12:03
To get the Natural logarithm of 10, use the Math.LN10 property in JavaScript. It returns the natural logarithm of 10, which is approximately 2.302.You can try to run the following code to get Natural logarithm of 10:Example Live Demo<html>    <head>       <title>JavaScript Math LN10 Property</title>    </head>   ... Read More

What is the difference between a definition and a declaration in C++?

Sai Subramanyam
Published on 16-Feb-2018 06:12:28
In C++, declaration and definition are often confused. A declaration means (in C) that you are telling the compiler about type, size and in case of function declaration, type and size of its parameters of any variable, or user-defined type or function in your program. No space is reserved in ... Read More
Advertisements