
ComPro: String
Authored by Nanta Janpitak
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
strcmp("A dog","a DOG");
ได้ผลลัพทธ์เท่าใด
0
1
-1
A dog
a DOG
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
คำสั่งใดผิด
char name[30] = "Kuerkul";
name= "Kuerkul";
strcpy(name,"Kuerkul");
char name[30];
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
ถ้าต้องการเก็บข้อมูลคำว่า "How are you?" ไว้ในตัวแปร s1 ต้องเขียนโปรแกรมอย่างไร
char s1[30];
printf("Enter string : ");
scanf("%s",s1);
char s1[30];
printf("Enter string : ");
gets(s1);
char s1[30];
printf("Enter string : ");
scanf("%c",&s1);
char s1[30];
printf("Enter string : ");
scanf("%c",s1);
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
char name[30];
int id;
scanf("%d",&id);
_____(answer)_______;
gets(name);
เมื่อรันโปรแกรมแล้วกรอก 5 แล้วกด enter หลังจากนั้น กรอก Jane แล้วกด enter
ถ้าต้องการให้ตัวแปร id = 5 และ ตัวแปร name = 'Jane'
ต้องเขียนโปรแกรมตรง (answer) ว่าอย่างไร
getchar();
gets()
input()
ไม่ต้องมีบรรทัดนี้
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
char string1[30];
int i,num;
gets(string1);
num=strlen(string1);
ถ้าป้อนข้อมูล Compro
แล้วสั่งพิมพ์ค่า num จะได้ผลลัพธ์เท่าใด
Compro
6
30
string1
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
char name[30] = "Bill";
char surname[30] = "Gate"
char fullname[60];
ถ้าต้องการให้ fullname คือการเอา surname มาต่อท้าย name ต้องใช้คำสั่งใด
strcpy(name,surname)
strcat(name,surname);
strlen(name,surname)
strcmp(name,surname)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
AP2 PROCESSING
Quiz
•
University
10 questions
POP QUIZ 4 (DFC40243)
Quiz
•
University
10 questions
Recursion Practice, Recursion Practice, Recursion Practice...
Quiz
•
10th Grade - University
11 questions
321-Quiz-08 - Names/Binding/Scope
Quiz
•
University
10 questions
Listen in Python
Quiz
•
University
10 questions
Introduction to AI - Healthcare & Business
Quiz
•
University - Professi...
10 questions
DS Quiz1
Quiz
•
University
10 questions
General Conceptos básicos
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University