Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
What is the output for the following code
main{
int x=90;
float *ptr;
ptr=(float *)&x;
*ptr=50.0;
printf("%d",x);
printf("%f",*pf);
}
Though the address of i & pf are same but the value which i get when i print x is a different integer value and when *pf is printed it gives the value 50.0 .why?
Related Answered Questions
Related Open Questions