C Strings 14: Search if a substring is present in a string [C Programming]

preview_player
Показать описание
Write a C program to check whether a given substring is present in the given string.

Expected Output :
Input a string : This is a test string
Input the substring to be searched : search
The substring does not exist in the string.

=================================================

Рекомендации по теме
Комментарии
Автор

I am really really struggling with an assignment, so it would be great if u can help me out...
Lets say u have a txt file which looks something like,

Noun
Dog
An animal
**
Adj
Pretty
Something beautiful
**
Noun
Quote
A value
**
Noun
Cinq
Something..
**

How can we make the program to display only the words that has a “Q” in it but is not followed by a “U”

Result should be something like - “cinq”

yasarasamarathunga
join shbcf.ru