- Strength to Increase Rep
- +14
- Strength to Decrease Rep
- -3
- Upvotes Received
- 718
- Posts with Upvotes
- 480
- Upvoting Members
- 124
- Downvotes Received
- 173
- Posts with Downvotes
- 138
- Downvoting Members
- 63
bovinoscatologist
- Interests
- throwing stones
- PC Specs
- i has a flavor?
Re: pizza with ranch dressing, rice krispie treat, and a diet pepsi. it's my healthy alternative. | |
Re: [QUOTE=vegaseat;890062]Once harm has been done, even a fool understands it. -- Homer[/QUOTE] Mmmmm.... Donuts. -- Homer | |
Re: change printf to fprintf and write to a .csv file [code]FILE * fp = fopen("mydata.csv", "w"); // opens file to write ("w"), using the FILE pointer "fp" //... printf("16 Bit:\n\n"); for (n=0;n<numberOfValues;n++){ fprintf(fp, "%.4x\n", rand16()); // prints to the file, using the file pointer "fp" //... fclose(fp); // close the … | |
Re: [QUOTE=computer engW;613127]Our doctor want us learn how to make these shapes by using loops for exam question.[/QUOTE] sweet. my doctor just wants me to bend over and take a deep breath. :( i should look into changing plans. . | |
Re: eeee??????????/////////?///?????//////////////????eee LOL WUT? | |
Re: this thread fails. [IMG] tags do not work in geeks lounge. also, image shack does not allow hotlinking. | |
Re: [b]PLAYST205[/b]: this is a Really. Common. Problem. one day you may have the unfortunate luck to revisit your posts here, and you'll be (rightfully) embarrassed at[I] just how whiny and helpless you're acting [/I]over something so trivial and mundane. ANYHOW... most text editors have a hotkey that will locate the … | |
too many new and intermediate users of C attempt to use the command [icode]fflush(stdin)[/icode] to "flush the input buffer". this is patently wrong. the rule is (and click if you don't believe me) : [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1052863818&id=1043284351"]NEVER [/URL][URL="http://answers.yahoo.com/question/index?qid=20071013052534AAuxWmW"]USE [/URL][URL="http://www.gidnetwork.com/b-57.html"]"FFLUSH()"[/URL] [URL="http://www.linuxforums.org/forum/linux-programming-scripting/41287-problem-fflush-stdin-function.html"]ON [/URL][URL="http://www.it.usyd.edu.au/~dasymond/mirror/c-faq/stdio/gets_flush2.html"]INPUT [/URL][URL="http://www.cplusplus.com/forum/general/6554/"]STREAMS [/URL][URL="http://c-faq.com/stdio/stdinflush.html"]SUCH [/URL][URL="http://gcc.gnu.org/ml/gcc-help/2009-01/msg00287.html"]AS [/URL][URL="http://www.dreamincode.net/forums/showtopic45833.htm"]"STDIN" [/URL] here is one method of properly … | |
Re: um... you pretty much just described the two steps. [code]$ gcc file1.c main.c $ ./a.out[/code] what more do you want to do? | |
Re: ive heard Python has a very simple USB interface too. but that means it's written in C. doesnt linux have a device filename for USB ports? like /dev/ugen something or other? cant you then do fopen( ) on that? just thinking... ive never done it, myself. | |
Re: Hi Narijuana Glomosim is not C. Did you [URL="http://lmgtfy.com/?q=glomosim"]look here?[/URL] | |
Re: [QUOTE=binoy.jayan;1180584]Hi friends... This works.. Try out.. Its the corrected one[/quote] so, when you say "works" ... you really mean "crashes with a fatal runtime error", right? thanks for resurrecting a 4 year old thread to post your non-working crap code. | |
Re: it just. doesn't. stop. | |
Re: ^ from that page: [QUOTE=jephthah;850293]on linux you would just grep sysctl for a block of info [icode]$ sysctl -a |grep therm ...[/icode] or query for the specific variable [icode]$ sysctl hw.acpi.thermal.tz0.temperature hw.acpi.thermal.tz0.temperature: 54.0C[/icode] [/quote] | |
Re: remember this fact: a variable of type [b]char[/b] is just an 8-bit [b]int[/b]. thats all it is, and all it ever was. try this and see: [icode]int a = 65; printf("%c", a);[/icode] | |
Re: so you want us to rework some code for your "friend's" homework assignment, and to hurry up about it, and to do it in a way that satisfies the teacher's requirements. sounds legit. | |
Re: spend less time worrying about your avatar, and you'll have more time to do your own work and not have to resort to cheating. | |
| |
Re: @nitin1: remember everything is in Base2, *binary*. so 2^11, the exponent, is a value between -1022 and +1023, but that is still the exponent of a base2 number, i.e. 2^-1022 to 2^1023 as a range, so in *base10* it gives a total *decimal* range of 10^-383 to 10^384. Similarly, 52 … | |
Re: [QUOTE=meghs007;837894]but one limitation in this code is this only find out the integer square root of the given number[/QUOTE] and that it's also broken code that won't compile, and doesn't even work worth a damn if you take the time to fix it. good job on that. totally worth resurrecting … | |
Re: WHOA, whoa, whoa... Clockowl. That is so, SO wrong, I dont know where to start. Did you even try this? have you ever tried this? of course not, it would never even remotely work. It doesnt even make SENSE. IMHO, you need to read more and help less. a lot … | |
Re: or....[code=c] int getNumDecimalDigits(int value) { char myString[16]; sprintf(myString,"%d",value); return strlen(myString); }[/code] :P . | |
Re: [QUOTE=AnnA.B;919077]iamthwee, tnx for your code. That's exactly what I need, but it's very hard to read[/QUOTE] really? you think so? i thought it was actually quite clever. you should hand it in, your instructor will be impressed. | |
| |
Re: you can't say [ICODE]values[x].city = s[/ICODE] ... you must do something like [ICODE]strcpy(values[x].city, s)[/ICODE] ... also dont put the "&s" when getting a string. just put "s" [code] while (fscanf(inp,"%s %d",s, &n) != EOF) { strcpy(values[x].city, s); values[x].temp = n; x++; } [/code] the reason is that "s" and "values[x].city" … | |
| |
Re: here you go: [code] #define GIT_R_DUN 3.00 #include <stdio.h> #include <math.h> int main() { double x = GIT_R_DUN; printf("root of %f = %f\n",x,sqrt(x)); } [/code] if questioned, tell your professor that NO ONE in the "real world" writes this stuff from scratch, then ask him if he's ever had a … | |