Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about strstr

Read more about strstr

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - strstr

What is wrong with it? This example from Head First C, does not run as it should be. I've tested every part but I jus't can't it figure out

#include <stdio.h> #include <string.h> char tracks[][80] = { "I left my heart in Harvard Med School", "Newark, Newark - a wonderful town", "Dancing w...
test-img

RIBA

c

newline

c-strings

fgets

strstr

Votes: 0

Answers: 1

Latest Answer

The function fgets can append the entered string with the new line character '\n'. You need to remove it as for example fgets(search_for, 80, stdin); search_for[ strcspn( search_for, "\n" ) ...
test-img

Vlad from Moscow

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved