CPP - Problem Solving - debugging

CPP - Problem Solving - debugging

11th Grade

6 Qs

quiz-placeholder

Similar activities

Condition Programming Quiz

Condition Programming Quiz

1st Grade - University

9 Qs

FORMATIF 3 POWER POINT

FORMATIF 3 POWER POINT

11th Grade

10 Qs

Dasar Pemrograman & Arduino

Dasar Pemrograman & Arduino

11th Grade

10 Qs

Computer Basic

Computer Basic

11th Grade

10 Qs

KELAS XI BAB 2 UJI PENGETAHUAN

KELAS XI BAB 2 UJI PENGETAHUAN

11th Grade - University

10 Qs

Quiz Infor 1

Quiz Infor 1

11th Grade

11 Qs

C++ Structuri repetitive

C++ Structuri repetitive

8th Grade - University

7 Qs

Quiz Pemanfaatan Perkakas Teknologi Digital

Quiz Pemanfaatan Perkakas Teknologi Digital

10th Grade - University

10 Qs

CPP - Problem Solving - debugging

CPP - Problem Solving - debugging

Assessment

Quiz

Information Technology (IT)

11th Grade

Hard

Created by

John Oli

Used 1+ times

FREE Resource

6 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 20 pts

Media Image

Instructions:

  1. You are given a buggy C++ program that is supposed to compute the salaries of 5 employees.

  2. The program contains errors in syntax, casing, variables, operators, and computations.

  3. Your task is to debug the program by rewriting it completely in its correct form.

  4. The corrected program must:

    • Ask for hours worked and rate per hour for 5 employees

    • Compute and display each employee’s salary

    • Compute and display the total payroll

    • Compute and display the average salary of the 5 employees

  5. Type your corrected program in Wayground and submit.

Evaluate responses using AI:

OFF

Answer explanation

Media Image

2.

OPEN ENDED QUESTION

3 mins • 10 pts

Media Image

Instructions:

  1. You are given a buggy C++ program that is supposed to calculate the total cost of items.

  2. The program contains errors in syntax, casing, operators, and variables.

  3. Your task is to rewrite the entire program correctly.

  4. The corrected program must:

    • Ask for the quantity of items

    • Ask for the price per item

    • Compute and display the total cost

  5. Type your corrected program in Wayground and submit.

Evaluate responses using AI:

OFF

Answer explanation

Media Image

3.

OPEN ENDED QUESTION

3 mins • 10 pts

Media Image

Instruction

Rewrite the program correctly. Identify the errors in the code and fix them so that it runs without errors and produces the correct output.

Evaluate responses using AI:

OFF

Answer explanation

Media Image

4.

OPEN ENDED QUESTION

3 mins • 10 pts

Media Image

Instruction

Fix the syntax and logical errors so the program correctly computes the sum of two numbers.

Evaluate responses using AI:

OFF

Answer explanation

Media Image

5.

OPEN ENDED QUESTION

3 mins • 10 pts

Media Image

Instruction

Correct the program so that it properly displays the multiplication of two numbers.

Evaluate responses using AI:

OFF

Answer explanation

Media Image

6.

OPEN ENDED QUESTION

3 mins • 20 pts

Media Image

Instruction

The following program is supposed to take 5 exam scores from the user, compute the total and average, and display both results. However, the program has multiple errors that prevent it from compiling or working correctly.
👉 Your task is to rewrite the program with the correct syntax and logic.

Evaluate responses using AI:

OFF

Answer explanation

Media Image