Computer Science, asked by tishaahuja06, 10 months ago

what is a statement and expression​

Answers

Answered by DMani3
3

Answer:

A statement is a complete line of code that performs some action, while an expression is any section of the code that evaluates to a value. ... Every expression can be used as a statement (whose effect is to evaluate the expression and ignore the resulting value), but most statements cannot be used as expressions.

Answered by ItzMultipleThanker
25

\boxed{\pink{\sf{\underline{Statement :-}}}}

ᴀ ꜱᴛᴀᴛᴇᴍᴇɴᴛ ɪꜱ ᴀ ᴄᴏᴍᴘᴜᴛᴇʀ ɪɴꜱᴛʀᴜᴄᴛɪᴏɴ ᴡʀɪᴛᴛᴇɴ ɪɴ ᴀ ꜱᴏᴜʀᴄᴇ ʟᴀɴɢᴜᴀɢᴇ, ꜱᴜᴄʜ ᴀꜱ Qʙᴀꜱɪᴄ, ᴡʜɪᴄʜ ɪꜱ ᴄᴏɴᴠᴇʀᴛᴇᴅ ɪɴᴛᴏ ᴏɴᴇ ᴏʀ ᴍᴏʀᴇ ᴍᴀᴄʜɪɴᴇ ᴄᴏᴅᴇ ɪɴꜱᴛʀᴜᴄᴛɪᴏɴꜱ ʙʏ ᴀ ᴄᴏᴍᴘɪʟᴇʀ.

\boxed{\color{blue}{\sf{\underline{Expression :-}}}}

ᴀɴ ᴇxᴘʀᴇꜱꜱɪᴏɴ ɪꜱ ᴀ ᴡᴀʏ ᴏꜰ ᴇxᴘʀᴇꜱꜱɪɴɢ ᴀ ᴄᴏɴᴄᴇᴘᴛ ᴜꜱɪɴɢ ᴀɴ ᴜɴᴋɴᴏᴡɴ ᴠᴀʟᴜᴇ (ᴠᴀʀɪᴀʙʟᴇ).

Similar questions