Yet another homework post

This is a discussion on Yet another homework post within the C Programming forums, part of the General Programming Boards category; which of these have the wrong syntax +why?i get some errors. int k, h; float k = 0.0 + p; ...

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    2

    Yet another homework post

    which of these have the wrong syntax +why?i get some errors.

    int k, h;
    float k = 0.0 + p;
    if (n = 4)
    #define MAX 10000*5
    while (m) { k++; m--}
    char c, h

    who knows out there.not me

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Read your book... then you should be able to answer your homework.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Quote Originally Posted by snapsleftguitar
    which of these have the wrong syntax +why?i get some errors.

    int k, h;
    float k = 0.0 + p;
    if (n = 4)
    #define MAX 10000*5
    while (m) { k++; m--}
    char c, h

    who knows out there.not me
    They are all valid code.

  4. #4
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    I clicked, now where is my candy ?

    on-topic:

    @snapsleftguitar: copy paste that code into your favorite IDE that uses a decent C compiler, hit the compile button, read the warnings or errors, try to reduce them to 0. That's your solution .
    Last edited by GanglyLamb; 08-13-2006 at 02:02 PM.

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Wow I'm so stumped.

    Do your own homework pal. And what kind of title is that? Of course we know C code as this is a C programming forum. But it is not a C programming forum that will do your homework for you.

    You people disgust me coming in here and posting your one shot do my homework threads when many many of us hammer out our own solutions without the aid of some all-knowing professor or teacher. We find the answers through a new advanced technological solution called: RESEARCH
    Last edited by VirtualAce; 08-13-2006 at 02:51 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help with HTTP POST
    By Anddos in forum Networking/Device Communication
    Replies: 5
    Last Post: 03-22-2009, 09:41 AM
  2. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 04:09 AM
  3. Post your Best Text Adventure
    By Joe100 in forum Game Programming
    Replies: 3
    Last Post: 08-15-2003, 06:47 PM
  4. Auto POST
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 06-07-2003, 11:42 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21