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

Swarali Sree
Published on 16-Feb-2018 10:50: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 10:47: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 10:44: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 define a variable in C++?

Paul Richard
Published on 16-Feb-2018 10:43:41
To define a variable in  C++, you need to use the following syntax −Syntaxdatatype variable_name;You need to know what type of data is your variable is going to hold and what it will be called. The variable name has constraints on what you can name it. Following are the rules ... Read More

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

Sai Subramanyam
Published on 16-Feb-2018 10:42: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

How to get Natural logarithm of 10 in JavaScript?

V Jyothi
Published on 16-Feb-2018 10:42: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

How to declare a variable in C++?

Monica Mona
Published on 16-Feb-2018 10:31:59
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

How to define an enumerated type (enum) in C++?

Kumar Varma
Published on 16-Feb-2018 10:32:05
An enumerated type declares an optional type name and a set of zero or more identifiers that can be used as values of the type. Each enumerator is a constant whose type is the enumeration. For example, if you are creating an application that has a fixed number of types ... Read More

What are equality operators in C++?

Nishtha Thakur
Published on 16-Feb-2018 10:31:01
The equality operators in C++ are is equal to(==) and is not equal to(!=). They do the task as they are named. The binary equality operators compare their operands for strict equality or inequality. The equality operators, equal to (==) and not equal to (!=), have lower precedence than the ... Read More

What is the difference between prefix and postfix operators in C++?

Smita Kapse
Published on 16-Feb-2018 10:27:49
In the prefix version (i.e., ++i), the value of i is incremented, and the value of the expression is the new value of i. So basically it first increments then assigns a value to the expression. In the postfix version (i.e., i++), the value of i is incremented, however, the {value|the ... Read More
Advertisements