<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Uninitialized variable - Page 6 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=uninitialized_variable&amp;p=5">1.Previous</a><br />
<a accesskey="3" href="page.php?w=uninitialized_variable&amp;p=7">3.Next</a>
</p>
<p>reserved for each of these members. Hence after <code>memcpy()</code>ing the resulted struct to <code>output</code>, we leak some stack memory to the caller.</p>

<p><syntaxhighlight lang="c"><br/>
#include <stdio.h><br/>
#include <string.h></string.h></stdio.h></syntaxhighlight></p>

<p>typedef struct {    char firstName[16];    char lastName[16];    unsigned int studentNumber;    unsigned int age;    unsigned int semester;    float gpa;} Student;</p>

<p>int registerStudent(Student* output, int age, char* firstName, char* lastName) {    //</p><p>
<a accesskey="1" href="page.php?w=uninitialized_variable&amp;p=5">1.Previous</a><br />
<a accesskey="3" href="page.php?w=uninitialized_variable&amp;p=7">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
