excans:31c2e02e50: Difference between revisions
From Stochiki
(Created page with "# <code>pi2 = pi;</code> # The reverse, <code>pi = pi2;</code> is a valid C statement if <code>pi</code> is not a constant and <code>pi2</code> is initialized. # '''a'''. <code>pi2 = 3.1415;</code><br>'''b'''. The reverse: <code>3.1415 = pi2;</code> is not valid since it is impossible to assign a value to a literal.") |
mNo edit summary |
||
Line 2: | Line 2: | ||
# The reverse, <code>pi = pi2;</code> is a valid C statement if <code>pi</code> is not a constant and <code>pi2</code> is initialized. | # The reverse, <code>pi = pi2;</code> is a valid C statement if <code>pi</code> is not a constant and <code>pi2</code> is initialized. | ||
# '''a'''. <code>pi2 = 3.1415;</code><br>'''b'''. The reverse: <code>3.1415 = pi2;</code> is not valid since it is impossible to assign a value to a literal. | # '''a'''. <code>pi2 = 3.1415;</code><br>'''b'''. The reverse: <code>3.1415 = pi2;</code> is not valid since it is impossible to assign a value to a literal. | ||
'''References''' | |||
{{cite web |url = https://en.wikibooks.org/w/index.php?title=C_Programming/Exercise_solutions&oldid=3676254 |title= C Programming/Exercise solutions | author = Wikibooks contributors |website= Wikibooks |publisher= Wikibooks |access-date = 13 May 2024 }} |
Latest revision as of 21:51, 13 May 2024
pi2 = pi;
- The reverse,
pi = pi2;
is a valid C statement ifpi
is not a constant andpi2
is initialized. - a.
pi2 = 3.1415;
b. The reverse:3.1415 = pi2;
is not valid since it is impossible to assign a value to a literal.
References
Wikibooks contributors. "C Programming/Exercise solutions". Wikibooks. Wikibooks. Retrieved 13 May 2024.