Question: In C language : One way to create such a MyPrintf function to print a string is to modify the following string length function: int

In C language:

One way to create such a MyPrintf function to print a string is to modify the following string length function:

int lenstr(char text[ ]) { int cnt = 0; while (text[cnt] != '\0') cnt++; return(cnt); }

This user defined function is only able to return the string length with spaces.

How to modify it to return the string length without spaces?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!