0

I got one test case failed in the following No Numerals code in description? Does anyone help me out to find

#include<stdio.h> #include <string.h> void ConvertFromNumericToWordsInString(char *pcSourceString, char *pcDestinationString); const char* GetStringFromNumericValue( char NumericValue ); int main() { char acUsrString[200] ; char acConvertedString[200]; gets(acUsrString); ConvertFromNumericToWordsInString( acUsrString , acConvertedString ); puts(acConvertedString); return 0; } void ConvertFromNumericToWordsInString(char *pcSourceString, char *pcDestinationString) { unsigned int ui32SourceStringIndex = 0, ui32DestinationStringIndex = 0; char acConstantForNumeric[10] = {0}; while(pcSourceString[ui32SourceStringIndex] != '\0') { if(pcSourceString[ui32SourceStringIndex] >= '0' && pcSourceString[ui32SourceStringIndex] <= '9') { strcpy( acConstantForNumeric , GetStringFromNumericValue(pcSourceString[ui32SourceStringIndex])); strcpy( (pcDestinationString+ui32DestinationStringIndex) , acConstantForNumeric ); ui32DestinationStringIndex += strlen(acConstantForNumeric); } else { pcDestinationString [ui32DestinationSt

1st Apr 2020, 8:35 AM
C King 👑
C King 👑 - avatar
1 ответ
0
Your code is truncated because you passed the character limits. Prefer to save the code in SoloLearn and share the link instead when the code is rather big (more than 10-15 lines). Delete the raw text code in your thread Description and replace it with the saved code link. Here's a guide on how you share links 👇 https://www.sololearn.com/post/75089/?ref=app
1st Apr 2020, 8:56 AM
Ipang