No error checking for fscanf(). That's the reason why it loops indefinitely, I assume.
Type: Posts; User: GL.Sam
No error checking for fscanf(). That's the reason why it loops indefinitely, I assume.
Why is multiposting necessary?
http://cboard.cprogramming.com/member.php?u=38563&tab=visitor_messaging#vmessage334
Umm, that's nice. "I'm a beginner so I should use it as an excuse." You will not dictate what I need and what I...
Oh. My. God.
Will you ever actually think before posting?
Also it could overall be rewritten in less obvious, but much more compact way:
if (speed >= 65)
/* calculate fine for this speed */
else if (speed >= 56)
/* we already know that value is...
claudiu
>else
Then this will execute not only for speed greater/equal to 65, but also for one that is lower than 46. One more if needed I suppose.
>the problem ceases to exist
I really have no idea why does it cease to exist. As to my knowledge, using sizeof with a typename always requires putting it in parentheses.
Actual value you read are not get changed in any way, if you up to the range limits of course. What may change is how it is displayed.
So, your 2.23 would look differently when used with different...
Johaneson
I already gave you a qouted link about your issue. What else do you want really?
>THIS AIN'T NO RUSSIAN BOARD!!!
Sorry :)
I've found it :D
#include <stdio.h>
#include <string.h>
int main(void)
{
int a, b, temp;
scanf("%d %d", &a, &b);
>3. Program to swap two numbers without using assignment operator in any part of the program.
Okay, the only thing that came into my mind is to read values from file/stdin, then make a temporary...
In order to answer the first two questions you need to know how float is represented internally. Here's a handy link:
Clusty Search ยป ieee floating point
>3. Program to swap two numbers without...
My eyes are bleeding.
I'm wondering how many times this question arose around.
Привет, бро, кстати. :)
Ummm... Ohhh... To say that I'm astounished means to say nothing. Would you be so kind not to do such a... thing anymore? The only thing that I can suggest is to reset file position indicator to...
>int binary_search(int[],int[]);
This.
So to achieve your goal you could use either buffering contents of the file to a temporary storage, applying tolower() to it and then rewriting the whole file, or updating the file just-in-time....
Technically speaking, this
>double **array
is not a real two-dimensional array, it just behaves like that giving proper memory allocations. So,
>function(what to write?)
would look like
double...
The idea is somewhat close to that of binary search, but here no part of an array should be ignored, that's why two statements of recursion are used. Try to trace this algorithm in debugger or even...
I don't quite understand what help do you need. tolower() is a standard function from <ctype.h> header. If you want to apply it to an arbitrary string you could do something like:
void...
>I'm awaiting your public apology to Salem.
>jumped into a useless argument
Without this argument I would have still been convinced in my view and I'm thankful for that. It wasn't useless. I'm just...
Salem
Thank you for making this one clear. It was much better than quzah's meaningless flame. I'd vote for adding this topic to the FAQ board or something.
>printf("fail");
---
>I didn't mean that sole printf() without a newline or fflush() will do. I just wanted to extend this list to include situations of upcoming input.
You perhaps should learn...
You probably want to read about typedef facility and how to use dynamic memory with structures properly, and try lesser examples to get used to them. Also I'd suggest reading a sticky thread about...
You got some serious messing with names here.