comp.lang.c
  Home FAQ Contact Sign in
comp.lang.c only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Re: What does this code do?         


Author: CBFalconer
Date: Feb 6, 2008 22:22

Richard Heathfield wrote:
> CBFalconer said:
>> James Dow Allen wrote:
>>>
>> ... snip ...
>>>
>>> Fragment #1
>>> int hw(uint64 x) {
>>> uint64 y;
>>>
>>> y = x & (x >> H0);
>>
>> nothing. H0 is undefined.
>
> Chuck, don't you think James *knows* he hasn't defined H0? He's
> not exactly J Random Newbie.

I rarely pay any great attention to the writers identity. It's
still undefined.
Show full article (0.62Kb)
9 Comments
  400 videos and pix of college girls and girlfriends at dorm parties         


Author: haba
Date: Feb 6, 2008 14:30

400 videos and pix of college girls and girlfriends at dorm parties
The girls at the dorm are throwing a party and you are invited! Here's
the movies and pictures of naughty college girls throwing the craziest
parties ever!

http://usef-free.blogspot.com
no comments
  interesting foo question (CHAR_BITS == 12)         


Author:
Date: Feb 6, 2008 14:28

char the_case = 42;

void foo(char *x)
{
*x = *x - 1;
}

int main(void)
{
foo(&the_case);
}

42 bottles of beer in the_case, 42 bottles of beer
=> you take its address and pass it to foo()
=> 41 bottles of beer in the_case.

Assuming (CHAR_BITS == 12), what is the next step?
6 Comments
  importance request         


Author: tygryskacz
Date: Feb 6, 2008 14:13

Dear Sir/Madam

I am a student of Warsaw School of Economics. I write a master's
thesis about a opinion on managers.

I would like to ask you to fill in the survey (link below) by you and
as many members of your group as possible. It will help me to write my
thesis. It takes only up to 7 minutes to fill it in.

The survey:
http://entropy.be/~mag/limesurvey/index.php?sid=94762&lang=en

If you could please also forward this mail to other members of the
group.

I will be rally grateful for your help.

Yours sincerely
no comments
  Re: "sorting the news"         


Author: John Bode
Date: Feb 6, 2008 13:39

On Feb 5, 4:37 pm, "Ivica" wrote:
> We have program which prints news.
> Every news contains subject and body text. Also, we count how much was every
> news read. Everytime a news get read, we add 1 to to the value "read".
> Create functions which will print the top 5 of the news, how much in average
> something gets read, and what's the difference between the top news and the
> news in the middle.
>
> Here is some nasty code, I've translated it from Croatian. Hope it makes
> sense.
>
> However, sorting looks pretty nasty and it's written badly. Any suggestions
> in changing?
> I am stuck with the deadline, only tomorrow is left for me for having fun
> with this code.
>
> Thanks in advance.
>
Show full article (10.99Kb)
9 Comments
  Re: Neatest way to get the end pointer?         


Author: Malcolm McLean
Date: Feb 6, 2008 12:36

"Tomás Ó hÉilidhe" lavabit.com> wrote in message
>
> I commonly use pointers to iterate thru an array. For example:
>
> int my_array[X];
>
> int *p = my_array;
> int const *const pend = my_array + sizeof my_array/sizeof*my_array;
>
> do *p++ = 42;
> while (pend != p);
>
> (Yes I realise the lack of spaces in the sizeof thing above is
> disgusting, but I've gotten so sick of writing it out that I make it as
> compact as possible)
>
> I can't count how many times I use this construct in my code every day.
> It's a right pain in the ass to always have to write out the long-winded
> intialiser for pend, so I'm considering switching to initialising pend
> as follows: ...
Show full article (2.14Kb)
17 Comments
  TUTORIAL         


Author: sheart.ltd
Date: Feb 6, 2008 11:11

where do you can find a tutorial of c and c++ ?
9 Comments
  Re: Neatest way to get the end pointer?         


Author: Keith Thompson
Date: Feb 6, 2008 09:36

"Tomás Ó hÉilidhe" lavabit.com> writes:
> Tomás Ó hÉilidhe:
>> Anyway, just wondering what people think of the alternative. Saves me
>> that little rush of pissed-off-ness every time I've to write out the
>> tedious sizeof thing.
>
> A few people have asked me why I just don't write:
>
> int const *const pend = my_array + X;
>
> The reason for this is:
>
> 1) I can't see the declaration or definition for my_array (and I don't
> want to see it). It could be defined in another source file. I don't
> know what macros is used for its length.
>
> 2) The macro that decides the array's length might change. For instance,
> today, the code might be:
[snip]
Show full article (3.00Kb)
no comments
  Re: ANSI C?         


Author: Keith Thompson
Date: Feb 6, 2008 09:23

santosh gmail.com> writes:
[...]
> The '-ansi' option tells gcc to adhere to the "C90" Standard, i.e.,
> ISO:9899:1990. It's also called as "C89" or "ANSI C". But strictly
> speaking the last one (ANSI C) is invalid as "ANSI C" now refers to the
> Standard ratified by ANSI currently, which is ISO:9899:1999.
[...]

That's true, but in practice the term "ANSI C" almost always refers to
the language defined by the ANSI C89 standard (or, equivalently, by
the ISO C90 standard). I think that most people who know and care
about the difference use the term "ISO C" or, more commonly, refer
specifically to C89/C90 or to C99.

--
Keith Thompson (The_Other_Keith) mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
no comments
  Re: Problem with pointers, require some help         


Author: Flash Gordon
Date: Feb 6, 2008 08:49

santosh wrote, On 05/02/08 19:54:
> david wrote:
>
>> Thanks for the help, I used pointer to pointer as a few people
>> suggested.
>>
>> It is my first day with C programming language and I still collecting
>> books, websites and etc. with the most detailed explanation how
>> everything here works. Maybe you could recommend some good material?
>
> The C Programming Language (Second Edition) by Kernighan & Ritchie



Also the comp.lang.c FAQ which would have answered the OPs question. If
can be found at http://c-faq.com/
--
Flash Gordon
no comments
1 2 3