Thread: Need Some Authentic Answers

  1. #1
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278

    Need Some Authentic Answers

    1. In using compact syntax like "?:" in C do we really optimise anything?



    2. Kerninghan says in his book "C is not a block structured language because a function cannot be defined within another".So what has this to do with block structure language.Also what is a block structured language?



    3."Printf is not a part of C language".How?



    4.At most how many commandline arguements can we pass. Is it the maximum number "int" can hold?
    Last edited by Salem; 02-12-2006 at 01:09 PM. Reason: de tagging stuff which shouldn't have been tagged

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    1. No. just a shorthand way of doing if statements. The compiler will most likely generate the same code as if you use if statements.

    2. not sure either.

    3. yes, printf() has always been part of the C language standard library.

    4. There is no limit to the number of command-line arguments, except the largest number that can be put into an integer (see limits.h). There is a practical limit of the number of characters that can be on the command-line -- and that depends on the operating system.

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    5. Why do people who post to forums use code tags for text--which preserves the exact formatting and results in the page being double width--when quote tags would achieve the same effect yet make the screen normal width and easy to read?

    6. Why do people who post to forums fail to proof read their posts in order to catch mistakes they make?

  4. #4
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    3. printf is not part of the C language, its part of the C standard library.
    My Website
    010000110010101100101011
    Add Color To Your Code!

  5. #5
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    7. Please give me your definition of an "authentic answer".
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    8. Why do you post your homework/exam question here?

    As for 3., I personally consider the standard library part of the language, so the question's premise is flawed.
    As for 4., this has nothing to do with C. Please kick your teacher.

    Psychopath: I think he meant "authoritative".
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Psychopath: I think he meant "authoritative".
    Ah, now it makes sense.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  8. #8
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    of course Printf (capital f) is not a part of the language nor the standard library (which I indeed consider a part of the language as well, though technically that's not quite correct).

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by jwenting
    of course Printf (capital f) is not a part of the language nor the standard library (which I indeed consider a part of the language as well, though technically that's not quite correct).
    Well, it's part of the official ISO language specification, so I think it's fair to say that it's part of the language.
    Not a required part though - freestanding implementations do not need to provide the CRT. But then, they don't need to provide a few other features either.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Yahoo Answers Type Website
    By Peckle in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 07-21-2008, 10:30 AM
  2. Accepting Word/Sentence Answers
    By Syllable in forum C++ Programming
    Replies: 2
    Last Post: 09-08-2006, 02:57 PM
  3. answers for Ivor Horton's Beginning C++?
    By 7stud in forum C++ Programming
    Replies: 1
    Last Post: 03-17-2005, 12:13 AM
  4. Answers for exercise in K & R
    By kermit in forum C Programming
    Replies: 7
    Last Post: 01-25-2003, 08:38 PM
  5. need answers! (Only have 10 minutes)
    By minime6696 in forum Windows Programming
    Replies: 4
    Last Post: 09-01-2001, 06:45 PM