我正在尝试将字符串解码为其内容,但程序输出与预期不符。输出是:
-858993623 444 333
什么是-858993623?
#include <stdio.h>
int main(void){
int areaCode;
long phoneNumber1;
long phoneNumber2;
char bracket1, bracket2, chard;
char tel[]="(555) 444-333";
sscanf(tel, "%c%d%c %ld%c%ld", &bracket1, &bracket2, &areaCode, &phoneNumber1, &chard, &phoneNumber2 );
printf("%d %ld %ld", areaCode, phoneNumber1, phoneNumber2);
getch();
}