Find Length Of Longest Word In A String | C Programming Example

Find Length Of Longest Word In A String | C Programming Example

Portfolio Courses

2 года назад

8,747 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@corniflower9232
@corniflower9232 - 20.11.2022 08:57

hello i love this video! i have an assignement "Enter a string and calculate the length of the longest ascending fragment inside it. By ascending fragments, we mean that each letter in the sequence is arranged in ascending order. For example, if you enter a string frscrndsvnyrsgtdy, then there are 8 ascending segments in the string, namely frs, cr, n, dsv, ny, rs, gt and dy. obviously, the longest ascending segment is frs, which has a length of 3". Is this video simiar concept to this homework, would i be able to use it as a reference to solve this assignement ?

Ответить
@marcjohnson6442
@marcjohnson6442 - 28.09.2022 19:10

This is a very good tutorial. Thank you.
It works fine as written, but I'm having trouble figuring out how to get it to accept input.
The auto-grader I'm using provides a random text, and a simple scanf("%s", s) only gives the value for the first word. I've tried using getc(), and fgets(), but I can't figure out what arguments they're asking for.
If you, or someone else could point me in the right direction, I'd appreciate it.

Thank you for your time.

Ответить
@vinkemtechnologies8962
@vinkemtechnologies8962 - 02.05.2022 19:40

Good evening. PLEASE! i don't understand why when i call the function in the main, it returns -1

Ответить
@arunezio8726
@arunezio8726 - 12.01.2022 10:19

Explanation was very clear...🙌
Can you please also tell how to print that word?

Ответить
@rohitpol
@rohitpol - 06.01.2022 09:07

Nice explanation

Ответить