Exam Help

This is a discussion on Exam Help within the C Programming forums, part of the General Programming Boards category; Can you please fill in the blanks and send me this exam paper.doc file back to Gaz@DjGaz.cjb.net I want to ...

  1. #1
    Unregistered
    Guest

    Exam Help

    Can you please fill in the blanks and send me this exam paper.doc file back to Gaz@DjGaz.cjb.net I want to know if I'm right so far and also want to know what the answers are to the stuff I don't know yet.
    Cheers.
    Gaz
    Here's the link:
    http://uniwork0.tripod.com/comp/Exam.DOC

  2. #2
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    523
    Exam help you say, sounds like you want someone to do it for you.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  3. #3
    GazUK
    Guest
    There not likely to give me the exact same exam paper are they !? I just need help with a few of the questions and to check if I am getting the others right !!

    Cheers.
    Gaz.
    P.S. should only take you people less than 5 minutes !! Please giz a hand. Because of the xmas break I havn't had chance to speak to any teachers and we are having an exam on Friday Yes I know I have a week to find out what I don't know, but you people give better explanations than the teachers do!

  4. #4
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    523
    I just need help with a few of the questions and to check if I am getting the others right !!
    Ok, so tell us what you got and well see if your right.
    If you think I'm mug enough to answer all your questions for you, your wrong.
    read this http://www.cprogramming.com/cboard/a...p?s=&forumid=4
    The homework section applies in this case
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  5. #5
    GazUK
    Guest
    OK, yeah your right, getting you to answer them all is pushing it. So can you just help me out with this question:
    I know I have it written down or in a book somewhere, but can't find it

    Here's the question:
    Write a print statement to write out the value of p formatted to 4 decimal places. You may assume that p is given by M_PI.

    Any ideas?

  6. #6
    Unregistered
    Guest
    p = Pie

    Sorry the symbol didn't show up.

  7. #7
    B26354 Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633

    Answers to the quiz

    No need for you to study! After all, so many of us have spent years perfecting our craft that it makes no sense for you to waste your time on it. I'm sure I speak for everyone when I say we'd love for you to benefit from our work.

    1. Circle the three errors in the program below and indicate clearly how they should be corrected.
    Code:
    #include <stdio>
    int main(void)
    {
      char letter;
    
      printf(“Input a single character\n”);
      Scanf(“\n%c”,letter);
      printf(“The letter is %c\n”,letter);
    
      return 0;
    }
    Circle 'main' and write "No prototype" next to it. Then circle 'return 0;' and write "Can't return nothing". Finally, in the second printf() statement, circle the second 'letter' and write "Redundant".

    2. Write a print statement to write out the value of pi formatted to 4 decimal places. You may assume that pi is given by M_PI.
    The answer is:
    Code:
    printf(pi);
    Note that M_PI isn't actually used. Since you can assume pi is given by M_PI, so can the compiler.

    3. For which of x=-1, 1, 6, 7 is hello printed out in the code below?
    if (x>2) printf(“hello\n”);
    None. This is a trick question. 'x' will never point to 2.

    4. Write a short program that obtains a decimal number from the user and prints out the square and cube of the number on the same line separated by a space.
    The answer is:
    Code:
    #include <stdio>
    int main( void ); /*prototype! */
    
    int main(void)
    {
      get_decimal_from_user();
    
      printf( square );
      printf( space );
      printf( cube );
    }
    Anyone else care to help this motivated student with the rest of his quiz?
    Jason Deckard

  8. #8
    Unregistered
    Guest
    God ! no wonder I couldn't do it !

    code:
    printf(pi);

    to give the value of pi.

    Simple as that eh ! I was looking allover for some big cunk of code. lol..... Suppose I would need math.h in the header files too.

    Thanx for all your help.
    That was all I needed. No need to ***** and moan about doing my homework for me, cheers to everyone on here that are decent people

  9. #9
    Registered User
    Join Date
    Jan 2002
    Posts
    6
    WHAT???!! THIS IS TOTALLY UNACCEPTABLE!!!! THE FACT THAT YOU GET YOUR WORK DONE BY OTHERS.IF YOU QUERIE-FAIR ENOUGH BUT I'M SURE I SPEAK FOR ALL TO SAY YOU ARE A PRAT!-AN INSULT TO THOSE WHO WORK HARD PLAY HARD SO WHY DON'T YOU USE THAT THING CALLED A BRAIN???

  10. #10
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    Hursh: If you read Deckard's wonderful post, you'll realise that GazUK has actually peed in his own bathwater!

    Deckard: Very, very nice

    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  11. #11
    Registered User biosx's Avatar
    Join Date
    Aug 2001
    Posts
    230
    lol Deckard..

    Nice work. Flush them lamers.

    (I love your name by the way)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. new problem with class
    By jrb47 in forum C++ Programming
    Replies: 0
    Last Post: 12-01-2006, 08:39 AM
  2. Lab exam
    By hawkins786 in forum C Programming
    Replies: 11
    Last Post: 05-24-2005, 12:24 PM
  3. Exam of programming
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-15-2005, 03:40 PM
  4. What do you think of my exam?
    By axon in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 12-03-2004, 08:30 PM
  5. Computer Science Exam Tomorrow!!!
    By cozman in forum C++ Programming
    Replies: 14
    Last Post: 05-23-2002, 09:23 AM

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