latex编译的makefile文件
有趣的数组

判断主机的字节序

yichen posted @ 2014年4月25日 16:50 in Essay , 872 阅读
#include <stdio.h>
 
typedef union 
{
    short s;
    char c[sizeof(short)];
} Utool; 
 
 
int main(int argc, char **argv)
{
    Utool un;
    un.s = 0x0102;
    if(sizeof(short) == 2)
    {
   if(un.c[0]==1 && un.c[1]==2)
       printf("big-endian\n");
   else if(un.c[0]==2 && un.c[1]==1)
       printf("little-endian\n");
   else
       printf("unknowable!\n");
    }
    return 0;
}
Avatar_small
NCERT Mathematics Sa 说:
2022年9月16日 03:37 Mathematics is one of the subjects which plays a key role in everyone’s life and it’s very important to each student. NCERT Mathematics Sample Paper Class 2 Mathematics is not a certain time helping subject, it is along with the people for their whole life at any time and at anywhere. It should begin from the foundation of Education to enable 2nd students to understand mathematics easily. Downloading NCERT Mathematics Sample Paper 2023 Class 2 for all formats of exams conducted under Term-1, Term-2 and other types of exams has available for every candidate who wants to get a keen clarity on the question pattern of the exam paper along with revised important questions.

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter