1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What does syntax in a programming language define?
The rules governing the structure and arrangement of code elements
Which of the following best describes semantics in programming
The meaning and logical effect of code
When are syntax errors typically detected?
During compilation
Which type of error is more difficult to catch?
Semantic errors
Which of the following is an example of a syntax error in C++?
Missing a semicolon at the end of a statement
Syntax is concerned with the meaning of the statements in a programming language. (true or false)
False
A program can have correct syntax but still produce incorrect results due to semantic errors. (true or false)
True
. What type of comment is // This is a comment in Java/C++?
Single-line comment
Identify the output of the following pseudocode:
int x = 5;
int y = 3;
System.out.println(x + y);
8
What control structure does the if-else block represent?
If-else
How many times will the following loop print 'Hello'?
for (int i = 0; i < 3; i++) {
System.out.println("Hello");
}
3
Which of the following is a NON-PRIMITIVE data type?
String
What is the purpose of a method (function) in programming?
To define a reusable block of code that performs a specific task
Which operator type is used to compare two values (e.g., ==, !=, >, <)?
Comparison operators