Which of these is a primitive data type used to store a single keyboard character such as 'A' or '?'?
Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)
Data types and structures:練習題
5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「Data types and structures」。
What would be the result of a substring operation on the string "ComputerScience" if the parameters were substring(4, 3) (using 0-based indexing where 4 is the start index and 3 is the length)?
A programmer needs to store data about a book, including its Title (String), Price (Real), and IsAvailable (Boolean). Which data structure allows these different data types to be stored together as a single entity?
Which of the following is considered a primitive data type used in programming?
A programmer needs to store a collection of 50 student names. Which data structure is most appropriate for storing this data under a single identifier?
State the most appropriate primitive data type for storing whether a user has agreed to the terms and conditions of a website.
先自己寫一次答案,再對照解題步驟。
A program needs to store the names of 30 students in a class. Identify the most efficient data structure to use and state its dimension.
先自己寫一次答案,再對照解題步驟。
Given a string variable \( S = "Edexcel" \), determine the result of a substring operation that extracts 4 characters starting from index 2.
先自己寫一次答案,再對照解題步驟。
A programmer is writing a script to calculate the area of a circle. The user needs to provide the radius as a decimal number.
(a) Identify the most appropriate data type for the variable radius.
(b) Write a line of code that takes a user's input and stores it as this data type.
先自己寫一次答案,再對照解題步驟。
An array named scores contains the following values: [45, 67, 12, 89, 34].
(a) State the 0-based index of the value 12.
(b) Write a pseudocode loop that iterates through every item in this array and outputs only scores greater than 50.
(c) Identify the data structure used for scores and state if it is static or dynamic in typical implementation.
先自己寫一次答案,再對照解題步驟。
* thinka提供的內容由AI生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。
想多做幾條同類題目?立即開始練習呢個課題,即做即批改。
立即練習