Does At symbol (@) and Dollar Sign ($) has any special meaning in C or C++

后端 未结 3 423
攒了一身酷
攒了一身酷 2020-12-08 19:51

Recently one of my friend encountered this question in an interview. The interviewer asked him if the special characters like $, @, |, ^, ~ have any usage in c

3条回答
  •  -上瘾入骨i
    2020-12-08 20:10

    To complete the accepted answer, the @ can be used to specify the absolute address of a variable on embedded systems.

    unsigned char buf[128]@0x2000;
    

    Note this is a non-standard compiler extension.

    Check out a good explanation here

提交回复
热议问题