Computer Science, asked by mathsfever, 11 months ago

what are literals and variables?

Answers

Answered by divyanshu50000
6
A literal is a value that is expressed as itself. For example, the number 25 or the string "Hello World" are both literals.

A constant is a data type that substitutes a literal. Constants are useful in situations where

a specific, unchanging value is to be used at various times during the software program
you want to more easily understand the software code
A variable in a program can change its value during the course of execution of the program. A constant retains the same value throughout the program.
hope it will help you please mark as brainlist ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅
Answered by sharad11111
3
Hope it is useful. And hope it is correct
Attachments:
Similar questions