Declare two variables as unsigned char.
use scanf with %d to read two values and store in the variables
when executing,
the first variable have 0 instead of scanned number;
the second variable have the scanned number;


-- 
           Summary: Scaning unsigned char variable as integer using scanf
                    results in that variable initialised to 0
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: suren dot r at live dot in


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42107

Reply via email to