![Computer Networking: A Top-Down Approach (7th Edition)](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
![CCS122_exer_pointer [Read-Only] [Compatibility Mode] - Word
Ace Jan C. Lape
File
Home
Insert
Design
Layout
References
Mailings
Review
View
Help
O Tell me what you want to do
& Share
X Cut
P Find -
Arial
- 11
A A Aa -
AABBCCL AABBC AaBbCc[ AaBbCcl AaBbCcD AaBbC
akc Replace
A Select -
EE Copy
BIU - abe x, x²
A - aly
Paste
- A-
Emphasis Heading 1 1 Normal
Strong
Subtitle
Title
Format Painter
Clipboard
Font
Paragraph
Styles
Editing
Example I/O layout:
Enter radius of a circle: 5.0
Area of a circle:
*output the result in function areaCirc(int *, int *)
*/
Circumference of a circle: *output the result in function circumCircle(int *, int *) */
Diameter of a circle: *output the result in function diamCirclint *, int *) *i
Enter two numbers to swap:
a=6
b= 10
*example user inputted valu for a*/
* example inputted value for b */
Their swap values are a = 10 and b=5 /*output the result of function swap(int *,int *) */
Enter an integer value: 10 <sample input>
The value 10 is an EVEN number. Il samle output if x is even
CUBE of 10 is 1000
4. Compress and submit the folder with the project.
Sample Output if Applicable
CA Z:\CCS122-1\L13FBC~1\EXER13.EXE
Enter radius of a circle: 45
Area of a circle: 6361.74
Circumference of a circle: 282.74
Diameter of a circle: 90
Enter two numbers to swap: 100 250
a = 100
b = 250
Their swap values are a=250 and b=100
Enter an integer value: 69
The value 69 is an ODD number.
Square of 69 is 4761
Remarks
Page 2 of 2
425 words
DE English (United States)
+ 100%
10:16 pm
J 4) ENG
05/04/2022
近](https://content.bartleby.com/qna-images/question/d88c5461-f12f-4b14-a2e9-88ec66d4c275/7354e2f6-f1b8-4c4d-8518-876dc3d7c6ae/cbhs9f7_thumbnail.png)
Transcribed Image Text:CCS122_exer_pointer [Read-Only] [Compatibility Mode] - Word
Ace Jan C. Lape
File
Home
Insert
Design
Layout
References
Mailings
Review
View
Help
O Tell me what you want to do
& Share
X Cut
P Find -
Arial
- 11
A A Aa -
AABBCCL AABBC AaBbCc[ AaBbCcl AaBbCcD AaBbC
akc Replace
A Select -
EE Copy
BIU - abe x, x²
A - aly
Paste
- A-
Emphasis Heading 1 1 Normal
Strong
Subtitle
Title
Format Painter
Clipboard
Font
Paragraph
Styles
Editing
Example I/O layout:
Enter radius of a circle: 5.0
Area of a circle:
*output the result in function areaCirc(int *, int *)
*/
Circumference of a circle: *output the result in function circumCircle(int *, int *) */
Diameter of a circle: *output the result in function diamCirclint *, int *) *i
Enter two numbers to swap:
a=6
b= 10
*example user inputted valu for a*/
* example inputted value for b */
Their swap values are a = 10 and b=5 /*output the result of function swap(int *,int *) */
Enter an integer value: 10 <sample input>
The value 10 is an EVEN number. Il samle output if x is even
CUBE of 10 is 1000
4. Compress and submit the folder with the project.
Sample Output if Applicable
CA Z:\CCS122-1\L13FBC~1\EXER13.EXE
Enter radius of a circle: 45
Area of a circle: 6361.74
Circumference of a circle: 282.74
Diameter of a circle: 90
Enter two numbers to swap: 100 250
a = 100
b = 250
Their swap values are a=250 and b=100
Enter an integer value: 69
The value 69 is an ODD number.
Square of 69 is 4761
Remarks
Page 2 of 2
425 words
DE English (United States)
+ 100%
10:16 pm
J 4) ENG
05/04/2022
近
![CCS122_exer_pointer [Read-Only] [Compatibility Mode] - Word
Ace Jan C. Lape
File
Home
Insert
Design
Layout
References
Mailings
Review
View
Help
O Tell me what you want to do
& Share
X Cut
P Find -
Arial
- 11
- A A Aa -
AABBCCL AABBC AaBbCc[ AaBbCcl AaBbCcD AaBbC
akc Replace
A Select -
EE Copy
Paste
BI U - abe x, x A - ay - A
Emphasis
Heading 1
I Normal
Strong
Subtitle
Title
Format Painter
Clipboard
Font
Paragraph
Styles
Editing
1. Create a project named "batch_10_01" inside "batch_10_01" folder.
2. Create the header file "pointer h" and define the methods of the following
functions using pointers as function parameters:
void areaCircle(int *radius, int *acirc)
{
/*compute the area of a circle and store the result to
the variable pointed by *acirc */
}
void circumCircle(int *radius.int *circumCircle)
{
*compute the circumference of a circle andd store the result
to the variable pointed by *circumCircle */
}
void diaCirc(int *radius, int diamCirc)
{/*compute the diameter of a circle andd store the result
to the variable pointed by *diamCirc */
}
void swap(int *a, int *b)
{
* write methods that will swap the value of a and b, such that
the value of a is b and b is a.
Example:
Values of a and b BEFORE
swap()
a=10
b=20
Values of a and b AFTER
swap()
a=20
b=10 */
}
void squareOrCube(int *x, int *result)
{
if the value of the variable pointed by x is ODD compute for the Square of
the number, where result=x * x. If it is EVEN compute for the cube of the
number, where result= x*x*x */
}
3. Create a file named "pointer.c" and include the header file "pointer h"
Implement all functions defined in the header file "pointer.h." in main() (from another
File – pointer test.c. All data inputs are done only in main().
Page 1 of 2
425 words
DE English (United States)
+ 100%
10:16 pm
J 4) ENG
05/04/2022
近](https://content.bartleby.com/qna-images/question/d88c5461-f12f-4b14-a2e9-88ec66d4c275/7354e2f6-f1b8-4c4d-8518-876dc3d7c6ae/v6hbhzk_thumbnail.png)
Transcribed Image Text:CCS122_exer_pointer [Read-Only] [Compatibility Mode] - Word
Ace Jan C. Lape
File
Home
Insert
Design
Layout
References
Mailings
Review
View
Help
O Tell me what you want to do
& Share
X Cut
P Find -
Arial
- 11
- A A Aa -
AABBCCL AABBC AaBbCc[ AaBbCcl AaBbCcD AaBbC
akc Replace
A Select -
EE Copy
Paste
BI U - abe x, x A - ay - A
Emphasis
Heading 1
I Normal
Strong
Subtitle
Title
Format Painter
Clipboard
Font
Paragraph
Styles
Editing
1. Create a project named "batch_10_01" inside "batch_10_01" folder.
2. Create the header file "pointer h" and define the methods of the following
functions using pointers as function parameters:
void areaCircle(int *radius, int *acirc)
{
/*compute the area of a circle and store the result to
the variable pointed by *acirc */
}
void circumCircle(int *radius.int *circumCircle)
{
*compute the circumference of a circle andd store the result
to the variable pointed by *circumCircle */
}
void diaCirc(int *radius, int diamCirc)
{/*compute the diameter of a circle andd store the result
to the variable pointed by *diamCirc */
}
void swap(int *a, int *b)
{
* write methods that will swap the value of a and b, such that
the value of a is b and b is a.
Example:
Values of a and b BEFORE
swap()
a=10
b=20
Values of a and b AFTER
swap()
a=20
b=10 */
}
void squareOrCube(int *x, int *result)
{
if the value of the variable pointed by x is ODD compute for the Square of
the number, where result=x * x. If it is EVEN compute for the cube of the
number, where result= x*x*x */
}
3. Create a file named "pointer.c" and include the header file "pointer h"
Implement all functions defined in the header file "pointer.h." in main() (from another
File – pointer test.c. All data inputs are done only in main().
Page 1 of 2
425 words
DE English (United States)
+ 100%
10:16 pm
J 4) ENG
05/04/2022
近
Expert Solution
![Check Mark](/static/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 3 images
![Blurred answer](/static/blurred-answer.jpg)
Knowledge Booster
Similar questions
- Can someone please explain this C++ code that my classmate did line by line please. Also, incase you needed further explanation the prompt is as follows: Implement an empty integer array of capacity 5. a) Use a loop to input values from the console into the array. b) Use a loop to determine the smallest element in the array. c) Use a loop to determine the largest element in the array. d) Use a loop to output the array. e) Output the smallest and largest elements. Example Output (input in bold italics)[0] = 4[1] = 24[2] = 123[3] = 54[4] = 3 Array: 4 24 123 54 3 Max: 123Min: 3arrow_forwardusing c++ with comments pleasearrow_forwardhelp with c++...paste indented code plzz Q3: Ask user enter size of array N, then ask user enter maximum number of array element X, then create an array size N, and assign each element of array to random number between 1~X. Print the array, and also find which element appeared most in the array, print all if there are multiple elements which are most at the same time. Sample input: Enter N: 20 Enter X: 10 Sample output: 8 7 10 8 1 7 4 3 4 7 5 6 4 3 1 10 1 9 9 10 1 4 7 appear mostarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY