Start like this:
#include <stdio.h>
int main(void)
{
/* Logic goes in here */
return 0;
Type: Posts; User: claudiu
Start like this:
#include <stdio.h>
int main(void)
{
/* Logic goes in here */
return 0;
Unless this is the "call a friend" stage on who wants to be a millionaire I am not interested.
You are not lost, you are just lazy. There is a major difference between the two.
I find that this is true for many other things in life nowadays, not just programming assignments. Over pampering seems to be the rule of thumb, which is very sad. Then again you get some lucky...
I agree with iMalc it really is both.
The problem with the high/low taxonomy is that besides its irrelevance it also gives the wrong derogatory perception, that for example a "low level language"...
I don't want to blame anyone for anything. :)
I was just offering some food for thought that you need to be aware of what you are doing when using scanf. Of course there is a bug in there, that was...
Not necessarily always safe, but certainly safer.
What about this case:
char *str;
size_t len;
We are not keen to take part in evil activities.
Well it depends on what your input file will look like. If you are guaranteed that your words are separated by one "space" (whatever character that may be) and one space only then yes. But if you...
A stupid question deserves a stupid solution:
Make str_cpy and str_cat do absolutely nothing and just return 0. (that's two lines of code)
Make str_printf malloc memory for s and initialize it to...
Do you have a debugger available such as gdb? This is a great time to learn how to use it. Step through the code and verify that the values in your variables (shift and ch) are what you expect them...
Let me google that for you
Your loop is wrong.
Try to refer to arrays using their index not using *(src + i) pointer notation to make things easier. You are going way too far in the loop because your condition is wrong....
1)You sound like you are up to no good.
2)You probably can't write code that works on any machine yet you want to write some hackbarf to steal your girlfriend's email password or some stupid thing...
Are you guys kidding me? Even if choice was an array instead of a single char you still wouldn't compare its "value" to "Yes" or "No" using ==. The OP's problem is that he has no idea how scanf works...
Note that it is usually extremely inefficient to insert at the end of a single linked list unless you are maintaining a pointer to the end of the list. Otherwise, you iterate over the whole list...
I think this post describes the problem with a short humorous anecdote.
Why casting malloc is a bad idea...
If you want to compile in C++ you might as well drop all the "C-style" and write C++ code. Use strings instead of char arrays, use references in functions instead of passing pointers and allocate...
Stop spoon feeding solutions to newbies that provide no code.
Also, don't cast malloc.
Without code it's difficult to say what is going on... I would bet that your I/O is different from what the automatic tester expects. I would read the requirements in the problem description again...
Well I am assuming that GetInt is probably reading an integer from the standard input (i.e. keyboard) and is validating that the input is actually an int. If the validation fails it either throws an...
While I don't want to be presumptuous this sounds dangerously close to "hey kids, let's not bother learning the C language I/O and use the instructor's crap library to avoid all that ugly stuff."...
Your for loop is wrong. You want to increment i and not decrement n. n should not change at all.
As always VS is a crap IDE choice for working in C. It is far too bloated with features that will slow you down rather than increase your productivity simply because:
a) you don't know what they are...
Heh, looks like another sighting of a manbearpig.