0 0 votes Please explain the output for the following program: #include<stdio.h> int main() { int i = 100; int *a = &i; float *f = (float *)a; (*f)++; printf("%d", *a); //getting some garbage value } Programming in C programming-in-c pointers output programming + – garvit_vijai 1.2k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply Shaik Masthan commented Sep 2, 2018 reply Follow flag @garvit_vijai, unknowingly, you took the toughest example... for understanding this you need the concept of how floating points represents in memory. 0 0 replyShare manisha11 commented Sep 10, 2018 i moved by manisha11 Sep 10, 2018 reply Follow flag printf (" *f=%d ", *f); gives 17?why? 0 0 replyShare Shaik Masthan commented Sep 10, 2018 reply Follow flag make it as comment not as answer the similar concept is https://gateoverflow.in/241739/nptel 0 0 replyShare Please log in or register to add a comment.