- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hey guys, I have implemented the Knuth Morris Pratt algorithm and wanted to share the C code with all of you. If you feel it can be optimized please let me know. Feel free to play with it or use it for your school work :icon_biggrin: *************************KMP****************************** [code=c] #include<stdio.h> #include<string.h> … | |
I keep getting this warning every time I compile the following code. Can anyone please tell me what I am doing wrong. Also, the printf(head->data) keeps saying that printf's argument is invalid. How do I print head's data? Any help is appreciated. Thanks, [CODE]#include<stdio.h> #include<malloc.h> typedef struct { int data; … | |
I'm having some trouble understanding the advantages and disadvantages of using scanf over fgets. When we have allocated memory using an array for eg, it is not wise to use scanf since buffer overflow can occur. But in what way does fgets prevent that from happening? Also, if you are … |