age, 在些链表中删除学生年龄等于age的学生信息。
程序代码
#I nclude "stdio.h"
#I nclude "conio.h"
struct stu{
char name[20];
char sex;
int no;
int age;
struct stu * next;
}*linklist;
struct stu *creatlist(int n)
{
int I;
//h为头结点,p为前一结点,s为当前结点
struct stu *h,*p,*s;
h = (struct stu *)malloc(sizeof(struct stu));
h->next = NULL;
p=h;
for(i=0;i
{
s = (struct stu *)malloc(sizeof(struct stu));
p->next = s;
printf(“Please input the information of the student: name sex no age \n”);
scanf(“%s %c %d %d”,s->name,&s->sex,&s->no,&s->age);
s->next = NULL;
p = s;
}
printf(“Create successful!”);
return(h);
}
void deletelist(struct stu *s,int a)
{
struct stu *p;
while(s->age!=a)
{
p = s;
s = s->next;
}
if(s==NULL)
printf(“The record is not exist.”);
else
{
p->next = s->next;
printf(“Delete successful!”);
}
}
void display(struct stu *s)
{
s = s->next;
while(s!=NULL)
{
printf(“%s %c %d %d\n”,s->name,s->sex,s->no,s->age);
s = s->next;
}
}
int main()
{
struct stu *s;
int n,age;
printf(“Please input the length of seqlist:\n”);
scanf(“%d”,&n);
s = creatlist(n);
display(s);
printf(“Please input the age:\n”);
scanf(“%d”,&age);
deletelist(s,age);
display(s);
return 0;
}
2、实现一个函数,把一个字符串中的字符从小写转为大写。
程序代码
#I nclude “stdio.h”
#I nclude “conio.h”
void uppers(char *s,char *us)
{
for(;*s!=’\0′;s++,us++)
{
if(*s>=’a'&&*s<=’z')
*us = *s-32;
else
*us = *s;
}
*us = ‘\0′;
}
int main()
{
char *s,*us;
char ss[20];
printf(“Please input a string:\n”);
scanf(“%s”,ss);
s = ss;
uppers(s,us);
printf(“The result is:\n%s\n”,us);
getch();
}
1.进程和线程的差别。
2.测试方法
3.Heap与stack的差别。
4.Windows下的内存是如何管理的?
5.介绍.Net和.Net的安全性。
6.客户端如何访问.Net组件实现Web Service?
7.C/C++编译器中虚表是如何完成的?
8.谈谈COM的线程模型。然后讨论进程内/外组件的差别。
9.谈谈IA32下的分页机制
10.给两个变量,如何找出一个带环单链表中是什么地方出现环的?
11.在IA32中一共有多少种办法从用户态跳到内核态?
12.如果只想让程序有一个实例运行,不能运行两个。像winamp一样,只能开一个窗口,怎样实现?
13.如何截取键盘的响应,让所有的‘a’变成‘b’?
14.Apartment在COM中有什么用?为什么要引入?
15.存储过程是什么?有什么用?有什么优点?
16.Template有什么特点?什么时候用?
17.谈谈Windows DNA结构的特点和优点。
18.网络编程中设计并发服务器,使用多进程与多线程 ,请问有什么区别?