int ch vs char ch之间的区别是什么?

时间:2016-05-21 06:49:15

标签: char int ch

为什么在't'"中使用int ch后续函数? ch是int,为什么要使用char?

梗概:

#include <stdio.h>
char *strrchr(char *string, int c);

示例:

#include <stdio.h>
int main() {
  char *s;
  char buf [] = "This is a testing";
  s = strrchr (buf, 't');
  if (s != NULL)
printf ("found a 't' at %s\n", s);
  return 0;
}

0 个答案:

没有答案
相关问题