current position:Home>Why is there an error when debugging

Why is there an error when debugging

2022-09-23 04:26:38CSDN Q&A

Skip all whitespace characters before the first non-whitespace character in the input and read the first consecutive word that has no whitespace characters

#include#include#include#include#define SIZE 80char* _countchar(char* ,int);int main(){char str[SIZE]; _countchar(str, SIZE); printf("you input word is:\n"); puts(str);}char* _countchar(char* p, int n){ char str1[SIZE]; char* ps = str1; char *judginput=fgets(str1,n,stdin); if (judginput) { char* judge_n = strchr(str1, '\n'); *judge_n = '\0'; } while (!isblank(*ps++)) { break; } while (isblank(*ps++)) { *p = *ps; break; } *(ps++) = '\0';}

img

copyright notice
author[CSDN Q&A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/266/202209161247412520.html

Random recommended