Okay, thank you.
Type: Posts; User: Dogmasur
Okay, thank you.
Thank you.
Okay, but what about the second part of my query? Are we just generalizing the code to get to the point of the original question or are the // being used to initialize loop?
Sorry, if I'm being...
I'm not in school, so don't be wary of any assignment sheet answer. I read the post and wanted to know what is the purpose of a shift operator. This may be beyond where I'm at in learning C anyway,...
Are the single-line comment identifiers // considered acceptable under c99 ANSI standard? They are used in C++, correct? Also, are you just leaving some of your code out ( ie variable...
Okay, thanks.
No effect or result? I understand what you mean by this, but could you give me an example of a function that would no result nor a "side-effect". I can't think of what a function's purpose would be...
So a void function is used for an effect on code and any other would be used to actually calculate the value of something, right?
That still leaves void as a valid keyword for a return-type doesn't it?
1. Replied to earlier.
2. I have fixed that issue, by not returning anything and changing my functions to void return-types.
3. Is this better:
void firstLetUpper ( char string[] )
{
...
So a void function can be used to protect your program from falling off the end of the program? I have also heard that a function without a return-type is interpreted as being an int. Is this...
Thanks. I was thinking of the extra character to hold the NULL terminator, but forgot that the first index of the string is actually 0 and not one.
I think I've got you. Does this mean I can omit the return statement altogether? The return-type in the function prototype still needs to remain char though, correct? Or can I go with void?
The...
I understand the strlen function, but as I said, I can't use it here. I never really looked into return. What should I be returning? I'll have to read up in the FAQ so I know exactly what it does....
Okay, so I figured it out and got it working. Like every other program that I have put together, I like to throw it out here so you all can chew me apart...hehe. Actually, I like to hear how I...
I was trying something along those lines. I was trying to check with isspace, but maybe my logic was wrong. I erased my function to start anew, but maybe I could rewrite what I had to show you.
...
I am currently teaching myself how to program in C ( only about a month of experience as of yet) and have taken on an assignment from someone here on the forums.
I was to write a program that...
Does this help:
http://en.wikipedia.org/wiki/Trajectory_of_a_projectile#Height_at_x
Look for Angle theta required to hit coordinate ( x,y)
Thats because one is considering a direct shot fired and the other angle is for a curved shot ( ie a mortar round's path of travel ). I would think for this problem you want the second, since a...
Okay, thank you. I thought I was having a brain freeze for a minute.
I am still a neophyte in the world of programming and am working on writing a program that accepts a string from the user and then returns that string in three different methods:
1) all uppercase...
I'm using a current compiler, but was reading out of an older book. Thanks for the heads up.
Isn't it also true that malloc always returns a character pointer, so in order to have it allocate another type it would need to be typecast? I just started learning about malloc myself and am...
Won't iNTies always be 0 with the code you have written? Regardless of '==' or '!=', you will always get one statement and never the other, unless you include something that will modify iNTies value...
You set iNTies to 0. Nothing in your code modifies the value. If iNTies is a variable from another part of the program, you would need to call that value instead of using one you've placed here.
...