0 votes
149 views
in C program by (98.9k points)
edited

 What are variables and it what way is it different from constants?

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
Variables and constants may at first look similar in a sense that both are identifiers made up of one character or more characters (letters, numbers and a few allowable symbols). Both will also hold a particular value. Values held by a variable can be altered throughout the program, and can be used in most operations and computations. Constants are given values at one time only, placed at the beginning of a program. This value is not altered in the program. For example, you can assigned a constant named PI and give it a value 3.1415 . You can then use it as PI in the program, instead of having to write 3.1415 each time you need it.
asked May 14, 2022 in C program by (98.9k points)
edited Jun 29, 2023
How do you access the values within an array?

Related questions

0 votes
1 answer 141 views
asked May 15, 2022 in C program by Doubtly (98.9k points)
0 votes
0 answers 90 views
0 votes
1 answer 130 views
0 votes
1 answer 182 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

559 users

...