EmbLogic's Blog

wrong output

#include
int main()
{
int =1000;
float=333333.987654;
printf(“%d \n”,&i);
printf(“%f \n”,&j);
return 0;
}

2 Responses to wrong output

  1. John McArthur says:

    To print the values of any variable the statement should be:

    printf(format specifier, variable name);
    However to print the address of the variable the statement should be :

    printf(format specifier, address of(variable) );

Leave a Reply to John McArthur Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>