将ascll码转换成数值进行运算

#include "stdlib.h"
#include "stdio.h"
int main()

{

  char a[8] = { 49,32,33,61,62,63,34,35 };
  char *s=(char*)malloc(9);
  char *str = s;
  memset(s, 0, 9);
  for (int i = 0; i < 8; i++)
  {
    *s = a[i];
    s++;
  }

  printf("%d\n", i);
  system("pause");
  return 0;
}

posted @ 2017-08-26 21:35  唯一诺  阅读(745)  评论(0编辑  收藏  举报