Q. What is function and explain different types of function with examples.
Answers
Answered by
4
Answer:
There can be 4 different types of user-defined functions, they are: Function with no arguments and no return value. Function with no arguments and a return value. Function with arguments and no return value.
Step-by-step explanation:
Answered by
3
Answer:
ʜᴇʀᴇ ɪs ʏᴏᴜʀ ᴀɴsᴡᴇʀ ⬇️
Step-by-step explanation:
ᴡᴇ ᴄᴀɴ ᴅᴇғɪɴᴇ ᴀ ғᴜɴᴄᴛɪᴏɴ ᴀs ᴀ sᴘᴇᴄɪᴀʟ ʀᴇʟᴀᴛɪᴏɴ ᴡʜɪᴄʜ ᴍᴀᴘs ᴇᴀᴄʜ ᴇʟᴇᴍᴇɴᴛ ᴏғ sᴇᴛ ᴀ ᴡɪᴛʜ ᴏɴᴇ ᴀɴᴅ ᴏɴʟʏ ᴏɴᴇ ᴇʟᴇᴍᴇɴᴛ ᴏғ sᴇᴛ ʙ. ʙᴏᴛʜ ᴛʜᴇ sᴇᴛs ᴀ ᴀɴᴅ ʙ ᴍᴜsᴛ ʙᴇ ɴᴏɴ-ᴇᴍᴘᴛʏ. ᴀ ғᴜɴᴄᴛɪᴏɴ ᴅᴇғɪɴᴇs ᴀ ᴘᴀʀᴛɪᴄᴜʟᴀʀ ᴏᴜᴛᴘᴜᴛ ғᴏʀ ᴀ ᴘᴀʀᴛɪᴄᴜʟᴀʀ ɪɴᴘᴜᴛ. ʜᴇɴᴄᴇ, ғ: ᴀ → ʙ ɪs ᴀ ғᴜɴᴄᴛɪᴏɴ sᴜᴄʜ ᴛʜᴀᴛ ғᴏʀ ᴀ ∈ ᴀ ᴛʜᴇʀᴇ ɪs ᴀ ᴜɴɪǫᴜᴇ ᴇʟᴇᴍᴇɴᴛ ʙ ∈ ʙ sᴜᴄʜ ᴛʜᴀᴛ (ᴀ, ʙ) ∈ ғ
Similar questions