30/09/2018, 16:01 
               
            Poll: Kiểm tra kiến thức C - 1.6
Các bạn thảo luận đáp án nhé, bài test lấy từ http://www.indiabix.com/online-test/c-programming-test/11
6.Which of the statements is correct about the program?
#include<stdio.h>
int main()
{
    float a=3.14;
    char *j;
    j = (char*)&a;
    printf("%d
", *j);
    return 0;
}
- A.	It prints ASCII value of the binary number present in the first byte of a float variable 
a. - B.	It prints character equivalent of the binary number present in the first byte of a float variable 
a. - C. It will print 3
 - D. It will print a garbage value
 
            Bài liên quan
         
               
            




Bài này Đạt chọn B, không biết đúng không. Phân tích như sau
printfdùng%dkhông phải%cBài này có nói về cách biểu diễn của float, tiếc là không có tiếng Việt
      
      Wikiwand
   
  
    
Single-precision floating-point format | Wikiwand
Single-precision floating-point format is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.