Sravani S has Published 90 Articles

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

Sravani S

Sravani S

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

25K+ 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

46K+ 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

187 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

474 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

Create an ordered list in HTML

Sravani S

Sravani S

Updated on 24-Jun-2020 08:36:04

394 Views

The HTML tag is used for creating an ordered list. You can try to run the following code to create an ordered list using the tag −The HTML tag supports the following additional attributes −AttributeValueDescriptioncompactautofocusDefines if compact rendering is required.reversed reversedSpecifies the order of the list (descending).start ... 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

218 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

1K+ 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 compare float and double in C++?

Sravani S

Sravani S

Updated on 24-Jun-2020 05:41:44

543 Views

Comparing floats and double variables depends on what your end goal is. If you want a runnable function without going too much in details and won't have a problem in some inaccurate calculations you can use the following function −Example#include using namespace std; // Define the error that you ... Read More

How to define global variable in a JavaScript function?

Sravani S

Sravani S

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

304 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

749 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

1 2 3 4 5 ... 9 Next
Advertisements