C programming please fill this: #include #include #include #include #include <

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C programming please fill this: #include #include #include #include #include <

Post by answerhappygod »

C programming
C Programming Please Fill This Include Ctype H Include Stdio H Include Stdlib H Include String H Include 1
C Programming Please Fill This Include Ctype H Include Stdio H Include Stdlib H Include String H Include 1 (11.15 KiB) Viewed 51 times
please fill this:
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/**
* \brief Converts all non-numerical characters in a
null-terminated
* string to zero character,
'0'.
*
* \details This function finds all non-numerical
characters in a string and
* converts these
characters into a zero character, '0'. It changes
* the found
non-numerical characters inplace so that no dynamic
* allocation is
needed.
*
* \param str The null-terminated string with some
non-numerical characters.
*
* \note stdlib provides useful character handling
functions in ctype.h.
* ctype.h documentation also states
different character classes,
* including numerical (digit)
characters.
*
* \note In your implementation, do not write to stdout to
check the functionality.
* You should use my_tests function to
print and check the functionality
* of your implementation.
*/
void convert_non_numbers(char* str) {
//TODO: implement your function here!
}
/**
* \brief conducts the tests for your implementation.
*
* \details You are strongly encouraged to test your
implementation
* using this function. Try to create at least three test
cases to check
* whether your function implementation is correct.
*
*/
void my_tests(void) {
// You can write your own test code here.
}
int main(void) {
/* You may implement your own tests in my_tests
function */
my_tests();
}
Implement a function that converts all non-numerical characters in a null-terminated string to zero character, 'o'. The function changes the found non-numerical characters inplace so that no dynamic allocation is needed. Hint stdlib provides useful character handling functions in ctype.h. ctype.h documentation also states different character classes, including numerical (digit) characters.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply