Message from C, C++ discussions

December 2019

— Hello?


Words with Length N

The program must accept a  space separated string S and an integer N as
the input. The program must print the words from S which are of length N
as the output. If no word is of length N then the program must print -1 as the output.

Boundary Condition(s):

1 <= Length of S <= 1000

Example Input/Output 1:


Have a good day



Have good

Example Input/Output 2:


help the need




— See this

— The output is empty for this input..can anyone pls chk

— Read something about scanf first, prior to using it

— Scanf never returns EOF

— I tried ==1 also

— Https://

— You can't do accidental programming with C++ or C, must learn first

— The rest of the code is also a pice of rave.

— It will not work

— is working for small strings 😏