Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.
prog.c:14:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]
printf("%s", ten[0]);
ten là mảng char, vậy thì ten[0] là kiểu gì?
prog.c: In function ‘Chu_Dau’:
prog.c:32:14: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]
printf("%s ", s[i + 1]);
Đây là file stdio.h. Bạn up code của bạn lên.
Sao mà nó hiện lên v ạ?
Bạn mới chụp màn hình file stdio.h chứ đâu phải là code của bạn.
Ideone.com
Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.
Paste lên ideone thấy rõ lỗi ghê.
ten là mảng char, vậy thì ten[0] là kiểu gì?
Tương tự lỗi trên.
E không hiểu?
Anh giải thích giúp vs được không?
Bạn đã khai báo
Vậy thì
ten[0]
có kiểu dữ liệu là gì? Tại sao lúc print ra lại dùng chỉ thị “%s” để in raten[0]
?dạ %c …
Sửa lỗi đi bạn.
P/s: 20 char