[计算机类试卷]国家三级(网络技术)机试模拟试卷184及答案与解析.doc

上传人:ownview251 文档编号:495693 上传时间:2018-11-28 格式:DOC 页数:4 大小:123KB
下载 相关 举报
[计算机类试卷]国家三级(网络技术)机试模拟试卷184及答案与解析.doc_第1页
第1页 / 共4页
[计算机类试卷]国家三级(网络技术)机试模拟试卷184及答案与解析.doc_第2页
第2页 / 共4页
[计算机类试卷]国家三级(网络技术)机试模拟试卷184及答案与解析.doc_第3页
第3页 / 共4页
[计算机类试卷]国家三级(网络技术)机试模拟试卷184及答案与解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

国家三级(网络技术)机试模拟试卷 184及答案与解析 一、程序设计题 1 国家三级(网络技术)机试模拟试卷 184答案与解析 一、程序设计题 1 【正确答案】 【试题解析】 定义字符指针 p, q,并且 q指向字符串 str。定义计数整型变量cnt,设置其值等于 0。 在 while循环中调用 C语言的字符串库函数 strstr(),返回子字符串 substr在字符串 q第一次出现的位置,赋给变量 p。用 if语句判断,如果 p的值为空,则说明在字符串 str没有找到子字符串,退出循环。否则,变量 cnt加 1,再把 p的值加 2(因为子字符串 substr的长度为 2)赋给变量 q,执行下一次循环。直到字符串中不存在子字符串时,退出循环结束。 最后,返回子字符串 substr在字符串 str中出现的次数。

展开阅读全文
相关资源
猜你喜欢
  • ANSI ISO IEC 9804-1998(R2007) Information technology — Open Systems Interconnection — Service definition for the Commitment Concurrency and Recovery service element《信息技术.开放式系统互连.委托.pdf ANSI ISO IEC 9804-1998(R2007) Information technology — Open Systems Interconnection — Service definition for the Commitment Concurrency and Recovery service element《信息技术.开放式系统互连.委托.pdf
  • ANSI ISO IEC 9805-1-1998 Information technology Open Systems Interconnection Protocol for the Commitment Concurrency and Recovery service element Protocol specification (Adopted by.pdf ANSI ISO IEC 9805-1-1998 Information technology Open Systems Interconnection Protocol for the Commitment Concurrency and Recovery service element Protocol specification (Adopted by.pdf
  • ANSI ISO IEC 9805-2-1996 Information technology - Open Systems Interconnection - Protocol for the Commitment Concurrency and Recovery service element Protocol Implementation Confor.pdf ANSI ISO IEC 9805-2-1996 Information technology - Open Systems Interconnection - Protocol for the Commitment Concurrency and Recovery service element Protocol Implementation Confor.pdf
  • ANSI ISO IEC 9983-1995 Information technology - Designation of unrecorded flexible disk cartridges (Adopted by INCITS)《信息技术.INCITS采纳的未记录盒式软磁盘的命名》.pdf ANSI ISO IEC 9983-1995 Information technology - Designation of unrecorded flexible disk cartridges (Adopted by INCITS)《信息技术.INCITS采纳的未记录盒式软磁盘的命名》.pdf
  • ANSI ISO IEC 9995-1-1994 Information technology - Keyboard layouts for text and office systems - Part 1 General principles governing keyboard layouts (Adopted by INCITS)《信息技术.文本和办公.pdf ANSI ISO IEC 9995-1-1994 Information technology - Keyboard layouts for text and office systems - Part 1 General principles governing keyboard layouts (Adopted by INCITS)《信息技术.文本和办公.pdf
  • ANSI ISO IEC 9995-2-1994 Information technology - Keyboard layouts for text and office systems - Part 2 Alphanumeric section (Adopted by INCITS)《信息技术.文本和办公系统用键盘布局.第2部分 INCITS采纳的字母数.pdf ANSI ISO IEC 9995-2-1994 Information technology - Keyboard layouts for text and office systems - Part 2 Alphanumeric section (Adopted by INCITS)《信息技术.文本和办公系统用键盘布局.第2部分 INCITS采纳的字母数.pdf
  • ANSI ISO IEC 9995-4-1994 Information technology - Keyboard layouts for text and office systems - Part 4 Numeric section (Adopted by INCITS)《信息技术.文本和办公系统用键盘布局.第4部分 INCITS采纳的数字集》.pdf ANSI ISO IEC 9995-4-1994 Information technology - Keyboard layouts for text and office systems - Part 4 Numeric section (Adopted by INCITS)《信息技术.文本和办公系统用键盘布局.第4部分 INCITS采纳的数字集》.pdf
  • ANSI ISO IEC 9995-5-1994 Information technology - Keyboard layouts for text and office systems - Part 5 Editing section (Adopted by INCITS)《信息技术.文本和办公系统的键盘布局.第5部分 INCITS采纳的编辑部分》.pdf ANSI ISO IEC 9995-5-1994 Information technology - Keyboard layouts for text and office systems - Part 5 Editing section (Adopted by INCITS)《信息技术.文本和办公系统的键盘布局.第5部分 INCITS采纳的编辑部分》.pdf
  • ANSI ISO IEC 9995-6-1994 Information technology - Keyboard layouts for text and office systems - Part 6 Function Section (Adopted by INCITS)《信息技术.文本和办公系统用键盘布局.第6部分 INCITS采纳的功能部分》.pdf ANSI ISO IEC 9995-6-1994 Information technology - Keyboard layouts for text and office systems - Part 6 Function Section (Adopted by INCITS)《信息技术.文本和办公系统用键盘布局.第6部分 INCITS采纳的功能部分》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1