Lakshmi Srinivas has Published 287 Articles

What are global variables in C++?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 11-Feb-2020 09:57:02

8K+ Views

Global variables are defined outside of all the functions, usually on top of the program. The global variables will hold their value throughout the lifetime of your program.A global variable can be accessed by any function. That is, a global variable is available for use throughout your entire program after ... Read More

What are C++ Floating-Point Constants?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 11-Feb-2020 08:19:04

2K+ Views

Floating-point constants specify values that must have a fractional part.Floating-point constants have a "mantissa, " which specifies the value of the number, an "exponent, " which specifies the magnitude of the number, and an optional suffix that specifies the constant's type(double or float).The mantissa is specified as a sequence of ... Read More

What are different types of constants in C++?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 11-Feb-2020 08:09:49

787 Views

There are no types of constants in C++. It's just that you can declare any data type in C++ to be a constant. If a variable is declared as constant using the const keyword, you cannot reassign its value. Example#include using namespace std; int main() {    const int i = ... Read More

What are auto and decltype in C++?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 11-Feb-2020 07:56:41

382 Views

Auto is a keyword in C++11 and later that is used for automatic type deduction. 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. For example, you want ... Read More

What would be the output of MySQL SUM() function if a column having no values has been passed as its argument?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 07-Feb-2020 05:46:24

121 Views

When MySQL SUM() function got a column, having no values, as an argument then it will return NULL, rather than 0, as output. The column can be of any data type. Following the example, using a table named ‘social’ having only one column named ‘id’ with no values, will illustrate ... Read More

How can we use MySQL LPAD() and RPAD() functions in the same query for padding the string to both sides, left and right, of the original string?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 06-Feb-2020 06:15:59

800 Views

For achieving this, we must have to use one of the functions as the 1st argument of the other function. In other words, either RPAD() function would be the 1st argument of LPAD() function or LPAD() function would be the 1st argument of RPAD() function. It can be understood with ... Read More

What is the difference between MySQL INSTR() and FIND_IN_SET() functions?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Feb-2020 06:03:15

508 Views

As we know, both the functions are used to search a string from the arguments provided in them but there are some significant differences between them as followsFIND_IN_SET() function uses the string list that is itself a string containing the substring separated by commas. Whereas, INSTR() function contains a string ... Read More

Style unordered lists markers with CSS

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 03-Feb-2020 07:07:41

163 Views

The list-style-type property allows you to control the shape or style the unordered lists markers.Example                            India          UK          US          

Usage of margin-bottom property with CSS

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 03-Feb-2020 06:59:50

70 Views

The margin-bottom specifies the bottom margin of an element. It can have a value in length, % or auto. You can try to run the following code to set the bottom margin:Example                            This is a paragraph ... Read More

CSS padding-top property

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 03-Feb-2020 06:36:17

106 Views

The padding-top specifies the top padding of an element. It sets the top padding of an element. This can take a value in terms of length of %.Example                            This is a paragraph with a specified top padding                      This is another paragraph with a specified top padding in percent          

Advertisements