FUNDAMENTALS OF COMPUTER

WEB BROWSERS TECHNOLOGY

WHAT IS WEB TECHNOLOGY

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the difference between the Sub procedure and Function procedure?
A
Only the Sub procedure can perform actions
B
Both procedures can take arguments
C
Only the Function procedure can return a value
D
All of the above
Explanation: 

Detailed explanation-1: -A sub performs a task but does not return a value. A function returns a value of the tasks performed. Subs can be recalled from anywhere in the program and in multiple types. Functions are called by a variable.

Detailed explanation-2: -Difference Between Functions And Sub-Procedure. A Sub Procedure will perform the set of actions but it will not return the result. A function also performs a set of actions but it will returns the result.

Detailed explanation-3: -The difference between both types of procedures is that a Function procedure returns a value after performing its assigned task, whereas a Sub procedure does not return a value.

Detailed explanation-4: -Visual Basic uses several types of procedures: Sub Procedures perform actions but do not return a value to the calling code. Event-handling procedures are Sub procedures that execute in response to an event raised by user action or by an occurrence in a program. Function Procedures return a value to the calling code.

Detailed explanation-5: -Generally, you use a procedure to perform an action and a function to compute a value. Like unnamed or anonymous PL/SQL blocks, subprograms have a declarative part, an executable part, and an optional exception-handling part.

There is 1 question to complete.