CPP - Problem Solving - debugging

CPP - Problem Solving - debugging

11th Grade

6 Qs

quiz-placeholder

Similar activities

8th Social Media and Modern Communication Assessment

8th Social Media and Modern Communication Assessment

8th Grade - University

10 Qs

Pengenalan Kecerdasan Artifisial dan Pemecahan Masalah Kompleks

Pengenalan Kecerdasan Artifisial dan Pemecahan Masalah Kompleks

11th Grade

10 Qs

REVIEW TIME

REVIEW TIME

9th Grade - University

10 Qs

Database

Database

11th Grade

10 Qs

CyberSmart Quiz

CyberSmart Quiz

9th - 12th Grade

4 Qs

Pengetahuan Dasar HTML

Pengetahuan Dasar HTML

11th Grade

10 Qs

Decision-Making Process in Data Modelling

Decision-Making Process in Data Modelling

11th Grade - University

10 Qs

Kuis Pengenalan Sistem Basis Data

Kuis Pengenalan Sistem Basis Data

11th Grade

10 Qs

CPP - Problem Solving - debugging

CPP - Problem Solving - debugging

Assessment

Quiz

Information Technology (IT)

11th Grade

Practice Problem

Hard

Created by

John Oli

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?