平时会有写程序的习惯,那么,写过就丢掉那就太浪费了,所以在这就记录下来,可以留作纪念
/*
#include<stdio.h>
#define MAX 50
typedef int KeyType;
typedef char InfoType;
typedef struct
{
KeyType key;
InfoType otheritems;
}RecType;
typedef RecType SeqRecList[MAX];
int main()
{
int a;
printf(" dd dd \n");
return 0;
}
#include <stdio.h>
#define max 10
typedef int KeyType;
typedef char InfoType;
typedef struct
{
KeyType key;
InfoType otheritems;
}RecType;
int main()
{
int i=0,j=0,k=0;
int flag=1;
RecType temp;
RecType R;
RecType q[10];
R.key=1;
R.otheritems='a';
printf("%d\n",R.key);
printf("%c\n",R.otheritems);
for(i=0;i<10;i++)
{
q[i].key=i+1;
q[i].otheritems='a'+i;
}
for(i=0;i<10;i++)
{
printf("%d ",q[i].key);
printf("%c ",q[i].otheritems);
}
printf("\n");
for(i=0;i<10&&1==flag;i++)
{
flag=0;
for(j=8;j>=i;j--)
{
if(q[j+1].key>q[j].key)
{
temp=q[j+1];
q[j+1]=q[j];
q[j]=temp;
flag=1;
}
}
}
for(i=0;i<10;i++)
{
printf("%d ",q[i].key);
printf("%c ",q[i].otheritems);
}
return 0;
}
*/
#include <time.h>
#include <ctype.h>
#include <stdio.h>
int main()
{
int a=98;
time_t timer =time(NULL);
printf("ctime is %s\n",ctime(&timer));
if(isdigit(a))
printf("asdf\n");
if(isalpha(a))
printf("zxcv\n");
printf("%c",a);
return 0;
}