下列何种宣告变数的方法是错误的

2022 高二下半年小测验1 String.h & Function

Quiz
•
Computers, Science
•
12th Grade
•
Medium
C Programming undefined
Used 46+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int i[2][3];
char y[6];
string g[5];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
下列何者关于“输入字串”是错误的
scanf("%s",str);
gets("str");
scanf("%[^\n]s",str);
scanf("%[^!]s",str);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
string.h中,最适合用来比较2字串内容是否相同的function是?
mystrcmp(str1,str2)
strlen(str1,str2)
strcmp(str1,str2)
strcpy(str1,str2)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
下列何者关于strcpy(str1,str2)的叙述正确
将str1的内容复制到str2中
将str2的内容复制到str1中
将str2的内容复制到str1中,再把str2内容删除
将str1和str2的内容比较是否相同,相同则return 0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
下列何者叙述错误
void类型的function不需要return任何资料给主程式
int类型的function通常会return一个整数值到主程式
function可以return string字串
function可以return char字元
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
自行设计可以计算字串长度的function,蓝色长方形内应怎么写
x=0;mystr[x]!='\0';x++
length=0;str[x]!='\0';length++
x=0;mystr1[x]!='\0';x++
x=0;str1[x]!='\0';x++
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
自行设计计算次方的function,蓝色长方形内应填入什么?
a;a<=y;a++
a=0;a<=y;a++
a;y<=a;a++
y;a<=y;y++
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
一年级科学磁铁

Quiz
•
1st - 12th Grade
9 questions
Quiz sobre a aula passada!

Quiz
•
9th - 12th Grade
13 questions
APCSA Unit 3 Review

Quiz
•
9th - 12th Grade
13 questions
Unit 4 AP CSA Review

Quiz
•
12th Grade
15 questions
五年级科学(食物网与食物链)

Quiz
•
1st - 12th Grade
14 questions
科学初二下册Ch10电生磁 磁生电

Quiz
•
8th - 12th Grade
10 questions
二年级科学植物

Quiz
•
1st - 12th Grade
14 questions
科学初一下册Ch06平衡与稳度

Quiz
•
8th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University