<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://coderwiki.org/index.php?action=history&amp;feed=atom&amp;title=Assignment</id>
	<title>Assignment - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://coderwiki.org/index.php?action=history&amp;feed=atom&amp;title=Assignment"/>
	<link rel="alternate" type="text/html" href="http://coderwiki.org/index.php?title=Assignment&amp;action=history"/>
	<updated>2026-05-19T01:38:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://coderwiki.org/index.php?title=Assignment&amp;diff=56&amp;oldid=prev</id>
		<title>Dylan: new</title>
		<link rel="alternate" type="text/html" href="http://coderwiki.org/index.php?title=Assignment&amp;diff=56&amp;oldid=prev"/>
		<updated>2025-08-09T17:16:06Z</updated>

		<summary type="html">&lt;p&gt;new&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Variable declaration]] and variable &amp;#039;&amp;#039;&amp;#039;assignment&amp;#039;&amp;#039;&amp;#039; are two separate terms but are often confused.&lt;br /&gt;
&lt;br /&gt;
== What is assignment? ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Assignment&amp;#039;&amp;#039;&amp;#039; is when we set the [[value]] of a [[variable]].&lt;br /&gt;
&lt;br /&gt;
In most [[Static typing|statically-typed]] languages, we must first [[Variable declaration|declare]] (create) the variable before we can give it a value. In some languages like [[Python]], however, we can [[Variable initialization|initialize]] any [[variable]] without needing to first [[Variable declaration|declare]] it.&lt;br /&gt;
&lt;br /&gt;
== How does it differ from [[initialization]]? ==&lt;br /&gt;
[[Initialization]] is also the process of giving a [[variable]] a [[value]]. So what&amp;#039;s the difference?&lt;br /&gt;
&lt;br /&gt;
Assignment is whenever we &amp;#039;&amp;#039;&amp;#039;change&amp;#039;&amp;#039;&amp;#039; the [[value]] of any [[variable]], while &amp;#039;&amp;#039;&amp;#039;[[initialization]]&amp;#039;&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;#039;only when it is first given a [[value]]&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This means that &amp;#039;&amp;#039;&amp;#039;[[initialization]]&amp;#039;&amp;#039;&amp;#039; is a &amp;#039;&amp;#039;type&amp;#039;&amp;#039; of &amp;#039;&amp;#039;&amp;#039;assignment&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Example: declaration and initialization in C ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int a;         // declaration: we create the &amp;#039;a&amp;#039; variable&lt;br /&gt;
a = 72;        // initialization: we give &amp;#039;a&amp;#039; a value&lt;br /&gt;
char b = &amp;#039;b&amp;#039;;  // declaration and initialization&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dylan</name></author>
	</entry>
</feed>