Quiz #2 - Programming Language

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:28 AM on 5/31/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

14 Terms

1
New cards

What does syntax in a programming language define?

The rules governing the structure and arrangement of code elements

2
New cards

Which of the following best describes semantics in programming

The meaning and logical effect of code

3
New cards

When are syntax errors typically detected?

During compilation

4
New cards

Which type of error is more difficult to catch?

Semantic errors

5
New cards

Which of the following is an example of a syntax error in C++?

Missing a semicolon at the end of a statement

6
New cards

Syntax is concerned with the meaning of the statements in a programming language. (true or false)

False

7
New cards

A program can have correct syntax but still produce incorrect results due to semantic errors. (true or false)

True

8
New cards

. What type of comment is // This is a comment in Java/C++?

Single-line comment

9
New cards

Identify the output of the following pseudocode:

int x = 5;

int y = 3;

System.out.println(x + y);

8

10
New cards

What control structure does the if-else block represent?

If-else

11
New cards

How many times will the following loop print 'Hello'?

for (int i = 0; i < 3; i++) {

    System.out.println("Hello");

}

3

12
New cards

Which of the following is a NON-PRIMITIVE data type?

String

13
New cards

What is the purpose of a method (function) in programming?

To define a reusable block of code that performs a specific task

14
New cards

Which operator type is used to compare two values (e.g., ==, !=, >, <)?

Comparison operators