Jump to content

Undefined values: Difference between revisions

Line 72:
</pre>
 
=={{header|C sharp|C#}}==
<lang C>
#include<stdlib.h>
#include<stdio.h>
 
int main()
{
int i=NULL;
if(i==NULL)
{
printf("i is undefined.");
}
else
{
printf("So much for writing code.");
}
return 0;
}
</lang>
And the output is:
<lang C>
i is undefined.
</lang>
=={{header|C sharp|C#}}==
In C# it's important to see the difference between reference and value types. For reference types (class instances) there is <code>null</code> as a general undefined reference.
503

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.