Question: Implements the function int GetStringWeight (char *pStr ) This function takes one parameter, which is a char pointer variable that points to a C
Implements the function int GetStringWeight (char *pStr ) This function takes one parameter, which is a char pointer variable that points to a C string. The function will calculate and return the weight of the C string. The weight of the C string is the total sum of the ASCII code representation of the characters in that string. [5 Points] example pStr = "Cat" The function will return 67+97+116 since ASCII('C') = 67, ASCII('a') = 97, and ASCII('t') = 116 Implements the function int GetStringWeight (char *pStr ) This function takes one parameter, which is a char pointer variable that points to a C string. The function will calculate and return the weight of the C string. The weight of the C string is the total sum of the ASCII code representation of the characters in that string. [5 Points] example pStr = "Cat" The function will return 67+97+116 since ASCII('C') = 67, ASCII('a') = 97, and ASCII ('t') = 116
Step by Step Solution
There are 3 Steps involved in it
Implementation of the GetStringWeight function C pr... View full answer
Get step-by-step solutions from verified subject matter experts
