C++ Coding Question, Fill the void function *n1, int *n2, int *n3) void passReference(int ( // Write your code here } Rounding to nearest 10 and rotating once clockwise In this coding exercise, you are asked to write the body of a function called passReference, which takes three integers by reference, round off each number to the nearest 10, and then right rotate all the numbers clockwise only once. For example, if variables a, b, and c contains the following values: a = 214; D=2147; == 214748; Then values of variables after calling the passReference(&a, &b, &c) will be: a = 214750 310

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
C++ Coding Question, Fill the void function
*n1, int *n2, int *n3)
void passReference(int
{
// Write your code here
}
Rounding to nearest 10 and rotating once clockwise
In this coding exercise, you are asked to write the body of a function called passReference, which
takes three integers by reference, round off each number to the nearest 10, and then right rotate all
the numbers clockwise only once.
For example, if variables a, b, and c contains the following values:
a = 214;
b = 2147;
c=214748;
Then values of variables after calling the passReference(&a, &b, &c) will be:
a = 214750
b = 210
c=2150
Sample inputs
214,2147,214748
10,20,30
0,2,3
5,9,13
2147483641,2147483635,2147483631
Sample outputs
214750,210,2150
0,10,20
0,0,0
10,0,10
2147483630,2147483640,2147483630
Transcribed Image Text:C++ Coding Question, Fill the void function *n1, int *n2, int *n3) void passReference(int { // Write your code here } Rounding to nearest 10 and rotating once clockwise In this coding exercise, you are asked to write the body of a function called passReference, which takes three integers by reference, round off each number to the nearest 10, and then right rotate all the numbers clockwise only once. For example, if variables a, b, and c contains the following values: a = 214; b = 2147; c=214748; Then values of variables after calling the passReference(&a, &b, &c) will be: a = 214750 b = 210 c=2150 Sample inputs 214,2147,214748 10,20,30 0,2,3 5,9,13 2147483641,2147483635,2147483631 Sample outputs 214750,210,2150 0,10,20 0,0,0 10,0,10 2147483630,2147483640,2147483630
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education