442 AC

【442 AC】

442 AC

文章插图
大家好,小龙来为大家解答以上的问题 。442 AC这个很多人还不知道,现在让我们一起来看看吧!
1、#include #include #include int main(int argc,char **argv){ if (argc != 2) {printf("Need a file!");return 0; } else {FILE *in;in=fopen(argv[1],"r");if ( ! in )return 0;fseek(in,-128,SEEK_END);char *str;char s[3];fread(&s,1,3,in);if (memcmp(&s,"TAG",3) ){printf("Do not contain ID3V1 TAG");return 0;}else{printf("ID3v1 info");str=malloc(30*sizeof(char));int i;fread(str,1,30,in);printf("TITLE: %s",str);fread(str,1,30,in);printf(" ARTIST: %s",str);fread(str,1,30,in);printf("ALBUM: %s",str);fread(str,1,4,in);if (str[0] != 0 )printf("YEAR: %c%c%c%c",str[0],str[1],str[2],str[3]);elseprintf("YEAR:");fread(str,1,30,in);printf("COMMENT: %s",str);if ( (str[28]==0) && (str[29]>0) )printf("TRACK: %d",str[29]);elseprintf("TRACK:");fread(str,1,1,in);if ( (unsigned char)str[0] != 0xFF )printf("GENRE: %u",(unsigned char)str[0]);elseprintf("GENRE:");free(str);}close(in); }} 。
本文到此分享完毕,希望对大家有所帮助 。

    推荐阅读