I have used a very simple code:
int main(void)
{
size_t variable;
/*prompt*/
printf("enter the value of the variable: ");
scanf("%zd", variable);
printf("you entered %zd value of the variable", variable);
}
Howeve, the GCC compiler produces the following result:
Enter the vale of the size_t variable: 15
You entered zd value of size_t type
Process returned 35 (0X23) execution time: 3.094s
Press any key to continue
My book also demonstrates the above example directly without mentioning that it is some kind of a special format specifier if library files were to be included. Even the online compiler is not producing correct results. Why is the code not working?