0
The first is the output string with a format specifier (%ld), while the next argument returns the sizeof value. In the final out
What does this mean can anyone Please Explain. The first is the output string with a format specifier (%ld), while the next argument returns the sizeof value. In the final output, the %ld (for long decimal) is replaced by the value in the second argument.
3 Respuestas
+ 5
It explains how this line works:
printf("%ld", sizeof(int));
sizeof is an operator, it takes 1 variable or data type and returns the size of it. In other words, it returns how many bytes can the data type hold. The value it returns is an unsigned int, and the code prints the value.
Just note that this code might reduce warnings of implicitly conversions because sizeof returns unsigned int, while %ld expects a long int.
+ 2
printf or scanf require two arguments first in double quotes indecate type and size of the second argument value that will be displayed or inputed from user ,separated by comma
printf("%d",number);