Sravani S has Published 79 Articles

What is the use of the '&' symbol in C++?

Sravani S

Sravani S

Updated on 07-Nov-2023 20:29:43

31K+ Views

The & symbol is used as an operator in C++. It is used in 2 different places, one as a bitwise and operator and one as a pointer address of operator.Bitwise ANDThe bitwise AND operator (&) compares each bit of the first operand to that bit of the second operand. ... Read More

Call by value and Call by reference in Java

Sravani S

Sravani S

Updated on 07-Nov-2023 04:25:11

68K+ Views

Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter.While Call by Reference means calling a method with a parameter as a reference. Through this, the argument reference is passed to the parameter.In call by value, the modification ... Read More

Set the width of the element in HTML

Sravani S

Sravani S

Updated on 24-Jun-2020 12:04:06

283 Views

Use the width attribute in HTML to set the width of an element. You can use the attribute with the following elements − , , , , , etc.ExampleYou can try to run the following code to implement width attribute in HTML − Live Demo                                        Your browser does not support the video element.           Output

How to indicate long quotations in an HTML document?

Sravani S

Sravani S

Updated on 24-Jun-2020 08:40:01

691 Views

Use the tag to indicate long quotations. The HTML tag is used to include long quotations (i.e. quotations that span multiple lines). It should contain only block-level elements within it and not just plain text.The following is the attribute −AttributeValueDescriptioncite URLURL of the quote, if it is taken ... Read More

How to display JavaScript variables in an HTML page without document.write?

Sravani S

Sravani S

Updated on 24-Jun-2020 06:42:02

414 Views

Use Element.innerHTML in JavaScript to display JavaScript variables in an HTML page without document.write.You can try to work through the following code snippet −var $myName = document.querySelector('.name'); var $jsValue = document.querySelector('.jsValue'); $myName.addEventListener('input', function(event){    $jsValue.innerHTML = $myName.value; }, false);

How to detect integer overflow in C++?

Sravani S

Sravani S

Updated on 24-Jun-2020 06:01:55

2K+ Views

The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than either value-added. So for example, unsigned ... Read More

How to define global variable in a JavaScript function?

Sravani S

Sravani S

Updated on 23-Jun-2020 11:56:54

408 Views

To declare a global variable, use the var at global scope −    var myGlobalVariable;    function display() {       //    } For JavaScript function, assign the property to a window −    function display() {       window. myGlobalVariable = …;    }

How to set the shadow effect of a text with JavaScript?

Sravani S

Sravani S

Updated on 23-Jun-2020 11:23:38

919 Views

To set the shadow effect, use the textShadow property in JavaScript.ExampleYou can try to run the following code to return the shadow effect of a text with JavaScript −           Set Text Shadow                This is Demo Text! ... Read More

How to get the value of the usemap attribute of an image with JavaScript?

Sravani S

Sravani S

Updated on 23-Jun-2020 11:03:29

200 Views

To get the value of the usemap attribute of an image, use the useMap property. You can try to run the following code to display the usemap attribute value −Example                                                var x = document.getElementById("myid").useMap;          document.write("Usemap: "+x);          

How to force a number to display in exponential notation?

Sravani S

Sravani S

Updated on 23-Jun-2020 08:43:16

944 Views

Use the toExponential() method to force a number to display in exponential notation, even if the number is in the range in which JavaScript normally uses standard notation.The following is the parameter −fractionDigits - An integer specifying the number of digits after the decimal point. Defaults to as many digits ... Read More

1 2 3 4 5 ... 8 Next
Advertisements