I am trying to run this code which seems fine to me but the end results are not much convincing. Here's the code:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
unsigned char nT,nF;
char extension[5];
puts("Enter No. of Testcases & Faults");
scanf("%d %d %s", &nT, &nF, extension);
printf("%d %d\n",nT,nF);
getch();
}
Below is the sample input:
Enter No. of Testcases & Faults
50 50 code
Below is the output:
0 50
Below is the Expected output:
50 50
Note: I am bounded to use unsigned char and cannot use unsigned int.
I am using DevCpp 4.9.9.2. Please help if anyone has got the solution or the reason for why this is happening.