Skip to main content

Timeline for strstr function not working

Current License: CC BY-SA 3.0

3 events
when toggle format what by license comment
Dec 6, 2016 at 23:54 comment added MARS GetString is like any other function in C, like printf for example, these functions are not part of the language but someone wrote them, to make life easier. As for your question, we can use fgets by adapting our program so that the strings match, in order to use srtstr, as you want, there are functions like gets, which add '\ 0' to the end of the string, but are considered obsolete and normally no longer part of stdio.h: char array[5][80] = {"CS50\n", "C Programming\n", "Java\n", "Python\n", "PHP\n",};
Dec 6, 2016 at 19:34 comment added qwerty I know it works.But I am trying to avoid using getstring since it exists only in cs50 library.Tell me an alternative for my program using fgets.
Dec 6, 2016 at 19:27 history answered MARS CC BY-SA 3.0