题目内容

msearch函数的功能:查找字符串s中是否存在字符ch,如果不存在返回-1,否则返回该字符所在的下标(串中若有多个字符ch,只返回第一个)。在主函数中输入字符串s和查找的字符ch,调用msearch函数,得到字符所在下标,并输出结果。#include int msearch(char *s,char ch){int i=0;while(s[i]!='\0'){if(s[i]==ch) return i;i--; /*$ERROR$*/}return -1;}void main(){char s[50],ch;int pot;printf("请输入一个字符串:\n");gets(s);printf("请输入要查找的字符:\n");scanf("%c",ch); /*$ERROR$*/pot=msearch(s); /*$ERROR$*/printf("%c这个字符的下标是%d\n",ch, pot);}

查看答案
更多问题

1. A: As the government’s spokesperson, what can you tell us about America’s employment situation in June?B: Among the major worker groups, unemployment rates _______ 21% for teenagers ____ 5.3% for adult women. The unemployment rates for adult women and blacks _____, while the rate increased for teenagers. _________ for adult men, whites, and Asians, they didn’t show ________ change.2. A: When I have to stand up to speak to a crowd, I tend to be lost for words. Then when I can finally talk more smoothly, I notice people whisper to each other or look at their phone. What can I do to get them to listen? B: Many speakers quickly lose control during _________ — the first five minutes. A good introduction to your topic can ______ greatly. Ask questions or tell a personal story _______ the crowd doesn’t lose interest in you.3. A: How did you become a diplomat? B: When I began _______ I thought I would become a university professor. Then my roommate sent my CV to the Ministry of Foreign Affairs, together with some of my published papers _______ my understanding of foreign affairs. I _________ as a joke. But you know what? A few months later, I found myself working at the Ministry of Foreign Affairs!4. A: What is Chinese government’s position on IPR (intellectual property rights) protection? B: Our national leaders have _______ innovation-driven growth. IPR protection is key to innovation. We’ve decided on a level of IPR protection _______ our national situation. Major progress has been made in this area in China over the past years _______ efforts made by people from all walks of life. We are also keen on learning the best practices _______ other countries.

1.病人王某,女,62岁,心衰入院。病人平时睡眠尚可,入院两天后主诉睡眠不好,每天睡眠3-4小时,入睡困难,多梦,护士经询问后,病人主诉病室温度低,觉得冷。晚间护理操作多,病室内有时不熄灯,开门声太大 。患病后精神紧张,焦虑,担心治不好,白浪费钱,对护士不敢提要求 ,请根据上述病例怎样促进病人睡眠?

以下属于办公用品管理规范的有:

A. 爱护节约,不铺张浪费
B. 可以公物私用
C. 人为破坏的,责任人要负责赔偿
D. 离职者办好交接手续方可离开

在办公室里可以大声讲话

A. 对
B. 错

答案查题题库