First time here? Checkout the FAQ!
0 votes
Explain in detail how and what conversion(in binary bit pattern) takes place for following codes:

1) int i=37;

    float f=*(float *)&i;

    printf("f=%f",f);     [Output:f=0.000000]

2)float f=7.0;

short s=*(short *)&f;

printf("s=%hd",s);      [Output:s=0]
closed with the note: Irrelevant for GATE, please see
asked in Programming by (97 points) 1 7
closed by | 92 views

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23242 Points

  2. Bikram

    17048 Points

  3. Habibkhan

    7096 Points

  4. srestha

    6012 Points

  5. Debashish Deka

    5430 Points

  6. jothee

    4928 Points

  7. Sachin Mittal 1

    4762 Points

  8. joshi_nitish

    4278 Points

  9. sushmita

    3954 Points

  10. Rishi yadav

    3744 Points

Recent Badges

Popular Question Ml_Nlp
Notable Question set2018
Notable Question rahul sharma 5
Notable Question Sanjay Sharma
Notable Question Lakshman Patel RJIT
Popular Question makhdoom ghaya
Popular Question Çșȇ ʛấẗẻ
Reader kenzou
Popular Question mystylecse
Notable Question Sanjay Sharma
27,262 questions
35,076 answers
33,185 users