Thread: Little question from newbie(

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Registered User
    Join Date
    Aug 2022
    Posts
    4
    Thx a lot for answers, really appreciate it. But i wonder why they gave such kind of tasks, even do not mention about possible problems might encountered, when you use gets function. Even if i re-writed this program with fgets function it wont work... in first solution, i didnt get it completely, im not familiar with such commands that he used to delete new line character yet(using loop, strchr, (*p) - defined like char etc). Second solution - doesnt help at all. Only helps when i use scanf("%s", town); instead of gets and fgets function to pass the name and town like char variable. Even Mike Dane from freeCodeCamp.org (not sure that you know him, but anyway) in his tutorials of C programming for beginners slightly mention about jeopardy of new line character due of using fgets function, but didbt tell how to avoid it....weird.((
    Last edited by Nirvanko; 08-13-2022 at 07:11 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hello, I am a newbie and so I have a newbie question;)
    By piratemonkey247 in forum C Programming
    Replies: 4
    Last Post: 12-20-2012, 10:59 AM
  2. Newbie question
    By Gareth321 in forum C Programming
    Replies: 6
    Last Post: 03-21-2012, 09:09 PM
  3. Newbie with Very Newbie Question
    By Jedi_Mediator in forum C++ Programming
    Replies: 18
    Last Post: 07-01-2008, 08:00 AM
  4. C++ newbie / linux not so newbie question
    By goldmonkey in forum C++ Programming
    Replies: 7
    Last Post: 12-13-2003, 12:27 PM
  5. newbie question
    By jgonzales in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2001, 01:34 PM

Tags for this Thread