In article <a1**********************************@q77g2000hsh. googlegroups.com>,
user923005 <dc*****@connx.comwrote:
>On Dec 12, 11:12 am, jayapal <jayapal...@gmail.comwrote:
>#include <stdio.h>
> main ()
{
int k = 10;
printf ( "%f\n", k);
>}
>This should do what you want. Look at
each difference between this program and your program. Each
difference is important.
>#include <stdio.h>
int main(void)
{
const int k = 10;
printf("%f\n", (double) k);
return 0;
}
What is the "important" difference between using int k = 10 or
const int k = 10 ? Will the abstract behaviour of the program
be different in -any- way by using 'const' or not using 'const'
in that program? Is there, for example, a difference in the
behaviour of the cast to double? Why is it important that k be const
but that you do not cast k to (const double) ?
--
"Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us." -- Ecclesiastes