What is the main difference between sub-procedure and function?

The sub-procedure is a block of multiple visual basic statements within Sub and End Sub statements. It is used to perform certain tasks, such as changing properties of objects, receiving or processing data, and displaying an output. You can define a sub-procedure anywhere in a program, such as in modules, structures, and classes. We can also provide arguments in a sub-procedure; however, it does not return a new value. The function is also a set of statements within the Function and End Function statements. It is similar to sub-procedure and performs the same task. The main difference between a function … Click here to continue…..

What are the different types of literals?

A literal is a textual representation of a particular value of a type. The different types of literals in Visual Basic are: Boolean Literals – Refers to the True and False literals that map to the true and false state, respectively. Integer Literals – Refers to literals that can be decimal (base 10), hexadecimal (base 16), or octal (base 8). Floating-Point Literals – Refers to an integer literal followed by an optional decimal point By default, a floating-point literal is of type Double. String Literals – Refers to a sequence of zero or more Unicode characters beginning and ending with … Click here to continue…..