Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-C++ Code Vulnerabilities- Looking for formatted output vulnerabilities in the code posted below or where this code avoided possible formatted output problems. Looking for three

-C++ Code Vulnerabilities-

Looking for formatted output vulnerabilities in the code posted below or where this code avoided possible formatted output problems. Looking for three or more answers corresponding to this code and vulnerabilities having to do with formatting input and output errors and some explanation of what those vulnerabilities are and how to solve/avoid them. Thanks!

#include //header file #include using namespace std; //main function int main() { //variable delcaration in double double overtime ,rate , hours ,salary; //pointer variable declaration int *ptrovertime = new int(); int *ptrRate = new int(); int *ptrhours = new int(); //asking user to enter the rquired value and store in variable cout<<"Enter standard hours worked: "; cin>>hours; //enter hours cout<<"Enter the pay rate: "; cin>>rate; //enter rate cout<<"Enter overtime hours worked: "; cin>>overtime; //enter overtime //calculate salary salary = hours * rate + (1.5 * overtime * rate); //initialize pointer variable ptrhours = (int*)&hours; ptrRate = (int*)&rate; ptrovertime = (int*)&overtime; //display the output cout<

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

For which purposes are data stored in organizations?

Answered: 1 week ago

Question

How does communication shape cultures and social communities?

Answered: 1 week ago

Question

1. What might have led to the misinformation?

Answered: 1 week ago