|
|
Up |
|
|
  |
Author: apaticulapaticul
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 |
|
  |
Author: nflstore74nflstore74
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
|
|
  |
Author: Tomás Ó hÉilidheTomá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 |
|
  |
Author: magicmanmagicman
Date: May 4, 2008 17:49
What does it mean?
what will f(12,8) output?
thanks
|
| |
|
3 Comments |
|
  |
Author: mike-yuemike-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 |
|
  |
|
|
  |
Author: BartcBartc
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 |
|
  |
|
|
  |
Author: apaticulapaticul
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 |
|
  |
|
|
  |
Author: Bob NelsonBob 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 |
|
|
|
|
|
|