Instructions: 1. In the code editor, you are provided with a main() function that asks the user for 2 characters, passes these characters to a function call of the getHigherValue() function, and then prints out the ASCII value of the higher character. 2. Your task is to implement the getHigherValue function which has the following details: 1. Return type - int 2. Name - getHigherValue 3. Parameters - 2 characters to be compared 4. Description - the ASCII value of the higher character. 3. Hint: Comparing characters in C is just like comparing integers.

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

Hello! Please help me find the C language code of this. Thank You!

O Answer Task
+
->
A app.codechum.com/student/answer/43403/question/7
E Back to Home
Time Left: 56:55
Overall Score: 0/70
Current Rank: A
Layout:
Side-by-Side
v Saved
main.c
+
Te:
7. Comparing Characters
Cas
1 #include<stdio.h>
by CodeChum Admin
2
3- int main) I
char a, b;
Most, if not all things have numeric values. That goes for characters to0o. In order to find out
4
which character has a higher value, we have to compare them with each other and display
printf("Enter first character: ");
a = getchar();
getchar();
the value of the higher character.
6.
7
Instructions:
9.
printf("Enter second character: ");
b = getchar)
getchar();
10
1. In the code editor, you are provided with a main() function that asks the user for 2
11
characters, passes these characters to a function call of the getHigherValue() function,
and then prints out the ASCII value of the higher character.
12
13
2. Your task is to implement the getHigherValue function which has the following details:
1. Return type - int
2. Name - getHigherValue
3. Parameters - 2 characters to be compared
4. Description - the ASCII value of the higher character.
14
printf("Result value = %d", getHigherValue(a, b));
15
16
return 0;
17 E
3. Hint: Comparing characters in C is just like comparing integers.
4. DO NOT EDIT ANYTHING IN THE MAIN
Input
1. First character
Score: 0/10
= Overview
7/7
Execute Code [F10]
Submit Code
ENG
4:12 pm
US
16/02/2022
...
Transcribed Image Text:O Answer Task + -> A app.codechum.com/student/answer/43403/question/7 E Back to Home Time Left: 56:55 Overall Score: 0/70 Current Rank: A Layout: Side-by-Side v Saved main.c + Te: 7. Comparing Characters Cas 1 #include<stdio.h> by CodeChum Admin 2 3- int main) I char a, b; Most, if not all things have numeric values. That goes for characters to0o. In order to find out 4 which character has a higher value, we have to compare them with each other and display printf("Enter first character: "); a = getchar(); getchar(); the value of the higher character. 6. 7 Instructions: 9. printf("Enter second character: "); b = getchar) getchar(); 10 1. In the code editor, you are provided with a main() function that asks the user for 2 11 characters, passes these characters to a function call of the getHigherValue() function, and then prints out the ASCII value of the higher character. 12 13 2. Your task is to implement the getHigherValue function which has the following details: 1. Return type - int 2. Name - getHigherValue 3. Parameters - 2 characters to be compared 4. Description - the ASCII value of the higher character. 14 printf("Result value = %d", getHigherValue(a, b)); 15 16 return 0; 17 E 3. Hint: Comparing characters in C is just like comparing integers. 4. DO NOT EDIT ANYTHING IN THE MAIN Input 1. First character Score: 0/10 = Overview 7/7 Execute Code [F10] Submit Code ENG 4:12 pm US 16/02/2022 ...
O Answer Task
+
->
A app.codechum.com/student/answer/43403/question/7
E Back to Home
Time Left: 56:49
Overall Score: 0/70
Current Rank: A
Layout:
Side-by-Side
v Saved
characters, passes these characters to a function call of the getHigherValue() function,
and then prints out the ASCII value of the higher character.
main.c
+
Te:
Cas
2. Your task is to implement the getHigherValue function which has the following details:
1. Return type - int
1 #include<stdio.h>
2
3- int main) {
char a, b;
2. Name - getHigherValue
4
3. Parameters - 2 characters to be compared
4. Description - the ASCII value of the higher character.
printf("Enter first character: ");
a = getchar();
getchar();
6.
3. Hint: Comparing characters in C is just like comparing integers.
4. DO NOT EDIT ANYTHING IN THE MAIN
7
9.
printf("Enter second character: ");
b = getchar)
getchar();
10
Input
11
12
13
1. First character
14
printf("Result value = %d", getHigherValue(a, b));
2. Second character
15
16
return 0;
17
Output
Enter first character: a
Enter second character: h
Result value = 104
Score: 0/10
= Overview
7/7
Execute Code [F10]
Submit Code
4:12 pm
16/02/2022
ENG
US
...
Transcribed Image Text:O Answer Task + -> A app.codechum.com/student/answer/43403/question/7 E Back to Home Time Left: 56:49 Overall Score: 0/70 Current Rank: A Layout: Side-by-Side v Saved characters, passes these characters to a function call of the getHigherValue() function, and then prints out the ASCII value of the higher character. main.c + Te: Cas 2. Your task is to implement the getHigherValue function which has the following details: 1. Return type - int 1 #include<stdio.h> 2 3- int main) { char a, b; 2. Name - getHigherValue 4 3. Parameters - 2 characters to be compared 4. Description - the ASCII value of the higher character. printf("Enter first character: "); a = getchar(); getchar(); 6. 3. Hint: Comparing characters in C is just like comparing integers. 4. DO NOT EDIT ANYTHING IN THE MAIN 7 9. printf("Enter second character: "); b = getchar) getchar(); 10 Input 11 12 13 1. First character 14 printf("Result value = %d", getHigherValue(a, b)); 2. Second character 15 16 return 0; 17 Output Enter first character: a Enter second character: h Result value = 104 Score: 0/10 = Overview 7/7 Execute Code [F10] Submit Code 4:12 pm 16/02/2022 ENG US ...
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
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
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