comp.lang.c
  Home FAQ Contact Sign in
comp.lang.c only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
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
  An interesting c program for beginners         


Author: apaticul
Date: May 4, 2008 23:45

Hi all,

O.K. here is an attempt to create a c program
which consists of
a structure, where you're supposed to enter some personal information.
Now, it's pretty obvious some folks would enter a larger ammount of
salary lets say a 6 figure.
My attempt is to have a few files, called result1.txt, result2.txt,
and result3.txt, saved in the same folder as the c program, lets call
it
"personalinfo.c"

this result.txt* files, would be as such:
result1.txt: "6 figure salary? Yeah, right! Try again (and cut a few
0's ;-) )
result2.txt: "5 figure salary? Good for you!"
result3.txt: "4 figure salary? Right on!"

the following is the I/O file
that would be included with the persoalinfo.c:
{
Show full article (2.38Kb)
7 Comments
  CHINA WHOLESALE BILLABONG ED HARDY CAPS FROM CHINA SUPPLIERS         


Author: nflstore74
Date: May 4, 2008 22:31

Thenikeshoes DOT net

If you are interested in any of our products, please contact our
salesman and they will respond in 24 hours after hearing from you. If
you cannot find the shoes you are seeking for in the list, please also
contact with us and send us your photos, we will do our best to find
the shoes from our partners and satisfy you with our best service.

Our main customers are from Europe and North America and we know well
about the requirements for those markets, such as style number,
sticker and box details. We sincerely hope to establish beneficial
partnership with your valued company
no comments
  Portability: Harmony between PC and microcontroller         


Author: Tomás Ó hÉilidhe
Date: May 4, 2008 18:16

I'll try to summarise this as best I can, as my last thread wasn't
very to-the-point:

The C Standard says the following two things:

* int is the natural integer type for the system.
* int must be at least 16-Bit.

Now the problem here is that these two criteria conflict if the
natural type for the system is in fact 8-Bit, which is the case with
many microcontrollers today.

As an example, let's take the following code:

char unsigned x, y;
...
x = y;

On my microcontroller compiler, this produces different assembler
depending on whether 'x' is an "unsigned int" or an "unsigned char".
If it's an "unsigned char", then the assembler is:

MOVF y, W /* Copy y to the accumulator */
MOVWF x /* Copy the accumulator to x */

However, if 'x' is an "unsigned int", then the assembler is:
Show full article (3.36Kb)
35 Comments
  #define f(g,g2) g##g2         


Author: magicman
Date: May 4, 2008 17:49

What does it mean?

what will f(12,8) output?

thanks
3 Comments
  A question: Is 200,000 element array worth sorting and search?         


Author: mike-yue
Date: May 4, 2008 15:27

The topic comes from a question:

Would you rather wait for the results of a quicksort, a linear search,
or a bubble sort on a 200000 element array?
1> Quicksort
2> Linear Search
3> Bubble Sort

The answer is 2> Linear Search

Could someone explain why Linear Search, not the other two options?
Or I misunderstood the original question?

Thanks you guys!
28 Comments
  Opinions about a book         


Author:
Date: May 4, 2008 13:15

What do you think about the following book:

C How to Program, 5/E
(Harvey & Paul) Deitel & Associates, Inc.

<http://www.pearsonhighered.com/educator/academic/product/0,3110,0132404168,00.ht...>

Thanks in advance.
56 Comments
  C Declarations         


Author: Bartc
Date: May 4, 2008 12:44

I need to be able generate C-style declarations from a specification (I call
it a typespec) in left-to-right form (as it might be expressed in English).

What is the algorithm, or where can I found the algorithm, to do so?

I have looked at some code in K&R2 p126 ('undcl'), but that works on
character input (I already have the typespec in internal form).

And I've heard of something called cdecl.c but that seems to be 2000 lines +
headers which I'm not keen to delve into; I expect the code to be very
simple, once I know it..

Simple Examples:

Input Outputs (with and without embedded name)

'Array 3 of int' int x[3] int[3]

'Pointer to char' char *x char*

But this needs to work with arbitrary typespecs.

--
Thanks,

Bartc.
1 Comment
  What is the difference between: int a (*daytab)[13] and int a *daytab[13]         


Author: magicman
Date: May 4, 2008 11:49

thx
5 Comments
  That's odd...         


Author: apaticul
Date: May 3, 2008 22:43

Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"

Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )

Thanks in advance.
17 Comments
  [Meta] WWDPD         


Author: Bob Nelson
Date: May 3, 2008 19:10

WWDPD - Before posting to c.l.c, I try to ask the question ``What would Dan
Pop do?''. With that in mind, I'm certain that Dan would never begin a
message with a salutation such as ``Hi'', ``Hey'' or ``Hello''.

As a oldtimer in this group, I don't recall usage of such salutations by Dan
or anyone else for that matter back in the 1990's. I also don't see the
esteemed experts of today starting a thread or responding to a post with
``Hi''.

Don't be mistaken. A post starting with this kind of greeting is most
certainly not offensive. I personally just take it as little more than
``unwarranted chumminess with the newsgroup'' (with apologies to dmr). I
suppose it arises from newbies accustomed to on-line chatting.

plz u can splain if i am rit bout dis
lol bye
2 Comments
 
1 2 3 4 5 6 7 8 9