Online C Programming Quizzes

Discussion in 'C Programming' started by Dexter, Oct 6, 2007.

  1. Dexter

    Dexter Guest

    My site is home to series of quizzes ranging from Accounting,
    Business, Math to programming languages. These are multiple choice
    type questions and you get a score card at end.

    For C language, I have 3 set of quizzes that anyone is welcome to try
    online for free.
    Questions on C quizzes are rather easy to solve for Professional C
    programmers yet for those who are taking C as a first programming
    course will find these useful in assesment their C
    knowledge


    Visit http://www.thinkanddone.com/exams/main.aspx


    Regards


    Asad S. Yousaf
     
    Dexter, Oct 6, 2007
    #1
    1. Advertising

  2. Dexter

    Army1987 Guest

    On Sat, 06 Oct 2007 00:22:53 -0700, Dexter wrote:

    > My site is home to series of quizzes ranging from Accounting,
    > Business, Math to programming languages. These are multiple choice
    > type questions and you get a score card at end.
    >
    > For C language, I have 3 set of quizzes that anyone is welcome to try
    > online for free.
    > Questions on C quizzes are rather easy to solve for Professional C
    > programmers yet for those who are taking C as a first programming
    > course will find these useful in assesment their C
    > knowledge
    >
    >
    > Visit http://www.thinkanddone.com/exams/main.aspx

    I found something wrong already at the first level.
    Question 3 is:
    3 . Its given that variable x has been assigned a value of 5, which of the following statement will output the message "I am quite right"
    if (x!=5) printf("I am quite right");
    if (x=5) printf("I am quite right");
    both statements will display the message
    none of the above
    The second statement will assign 5 to x (which happens to already
    have that value, but that's irrelevant) and, since the result of
    that assignment can never be zero, it will execute the expression
    statement consisting of the printf call. So I checked the second
    answer, but the test believes the correct answer to be "none of
    the above".

    --
    Army1987 (Replace "NOSPAM" with "email")
    A hamburger is better than nothing.
    Nothing is better than eternal happiness.
    Therefore, a hamburger is better than eternal happiness.
     
    Army1987, Oct 6, 2007
    #2
    1. Advertising

  3. Dexter

    Guest

    On Oct 6, 5:22 pm, Dexter <> wrote:
    > My site is home to series of quizzes ranging from Accounting,
    > Business, Math to programming languages. These are multiple choice
    > type questions and you get a score card at end.
    >
    > For C language, I have 3 set of quizzes that anyone is welcome to try
    > online for free.
    > Questions on C quizzes are rather easy to solve for Professional C
    > programmers yet for those who are taking C as a first programming
    > course will find these useful in assesment their C
    > knowledge
    >
    > Visithttp://www.thinkanddone.com/exams/main.aspx
    >
    > Regards
    >
    > Asad S. Yousaf


    Some of the questions could be better worded, and some of the
    questions are just plain wrong.

    --------------
    Dataset 1
    --------------

    Question 1 states: A C program is a collection of ______________
    (a) arrays
    (b) variables
    (c) functions
    (d) data types

    Neither of these answers are correct, though you state that (c) is the
    answer. A C program is more than a collection of functions. What
    about object declarations? Type declarations? The correct answer
    should be "declarations".

    Question 3 states: Its given that variable x has been assigned a value
    of 5, which of the following statement will output the message "I am
    quite right"

    (a) if (x!=5) printf("I am quite right");
    (b) if (x=5) printf("I am quite right");
    (c) both statements will display the message
    (d) none of the above

    You give answer (d) as the correct answer, when in fact the correct
    answer is (b). Remember, assignment expressions have a value too...

    Question 6: I don't like the wording of this question. The term
    "assignment" here I think is not really correct

    ---------------
    Dataset 2
    ---------------

    Question 1: This may just be a language barrier issue, but
    "alphabets" should be "letters"

    Question 5: I'm not sure that you should be so dogmatic about the use
    of infinite loops. They should not be used if you can avoid them, but
    I know Linux uses them a lot. Perhaps there are cases where you need
    to use them...

    Question 8: This may be bit-picking, but my interpretation of the
    Standard is that void actually *is* a value, but it is an empty value
    that cannot be used. I would be interested to know why this
    description was used. Why not just say void means "returning no value"

    Question 9: Sorry, your answer is wrong. You declare an array of 10
    characters. You can fit 10 characters in it. The answer is not 9.
    There is no rule that the last element of an array of char must be a
    null character. And even if there was, the null character is *still*
    a character!

    --------------
    Dataset 3
    --------------

    Question 2: Replace the word "commands" with "directives"

    Question 3: Where is the condition contained in round brackets?

    Question 6: Answer (d) is correct, not answer (c)

    Question 7: Answer (c) is given as correct, but goto is not a loop
    statement

    Question 8: A function *always* returns one value. Just because it
    is a pointer does not mean that it returns *many* values

    Question 9: All arguments are pass by value

    Question 10: 12 bytes is incorrect. The value is implementation
    defined, because a structure may have any amount of padding between
    its members or following the last member.


    Regards,
    B.
     
    , Oct 6, 2007
    #3
  4. Dexter

    pete Guest

    wrote:

    > Question 8: This may be bit-picking, but my interpretation of the
    > Standard is that void actually *is* a value, but it is an empty value
    > that cannot be used.


    An expression of type void has a nonexistent value,
    which to my way of thinking,
    means that expressions of type void don't have values.

    N869
    6.3.2.2 void
    [#1] The (nonexistent) value of a void expression (an
    expression that has type void) shall not be used in any way,
    and implicit or explicit conversions (except to void) shall
    not be applied to such an expression.

    --
    pete
     
    pete, Oct 6, 2007
    #4
  5. Dexter

    pete Guest

    wrote:
    >
    > On Oct 6, 5:22 pm, Dexter <> wrote:


    > > Visithttp://www.thinkanddone.com/exams/main.aspx


    > Some of the questions could be better worded, and some of the
    > questions are just plain wrong.
    >
    > --------------
    > Dataset 1
    > --------------
    >
    > Question 1 states: A C program is a collection of ______________
    > (a) arrays
    > (b) variables
    > (c) functions
    > (d) data types
    >
    > Neither of these answers are correct, though you state that (c) is the
    > answer. A C program is more than a collection of functions. What
    > about object declarations? Type declarations? The correct answer
    > should be "declarations".


    External declarations.

    A C program consists of:
    1 preprocessor directives
    2 comments
    3 external declarations
    4 extra white space

    --
    pete
     
    pete, Oct 6, 2007
    #5
  6. Dexter

    Flash Gordon Guest

    pete wrote, On 06/10/07 09:47:
    > wrote:
    >> On Oct 6, 5:22 pm, Dexter <> wrote:

    >
    >>> Visithttp://www.thinkanddone.com/exams/main.aspx

    >
    >> Some of the questions could be better worded, and some of the
    >> questions are just plain wrong.
    >>
    >> --------------
    >> Dataset 1
    >> --------------
    >>
    >> Question 1 states: A C program is a collection of ______________
    >> (a) arrays
    >> (b) variables
    >> (c) functions
    >> (d) data types
    >>
    >> Neither of these answers are correct, though you state that (c) is the
    >> answer. A C program is more than a collection of functions. What
    >> about object declarations? Type declarations? The correct answer
    >> should be "declarations".

    >
    > External declarations.
    >
    > A C program consists of:
    > 1 preprocessor directives
    > 2 comments
    > 3 external declarations
    > 4 extra white space


    To get a C program you need at least one definition (although a
    definition is of course also a declaration). If your are including
    comments in your list, then why not statements?
    --
    Flash Gordon
     
    Flash Gordon, Oct 6, 2007
    #6
  7. Dexter

    Guest

    On Oct 6, 6:43 pm, pete <> wrote:
    > wrote:
    > > Question 8: This may be bit-picking, but my interpretation of the
    > > Standard is that void actually *is* a value, but it is an empty value
    > > that cannot be used.

    >
    > An expression of type void has a nonexistent value,
    > which to my way of thinking,
    > means that expressions of type void don't have values.
    >
    > N869
    > 6.3.2.2 void
    > [#1] The (nonexistent) value of a void expression (an
    > expression that has type void) shall not be used in any way,
    > and implicit or explicit conversions (except to void) shall
    > not be applied to such an expression.
    >
    > --
    > pete


    Agreed, I was too lazy to look it up properly
     
    , Oct 6, 2007
    #7
  8. Dexter

    pete Guest

    Flash Gordon wrote:
    >
    > pete wrote, On 06/10/07 09:47:
    > > wrote:
    > >> On Oct 6, 5:22 pm, Dexter <> wrote:

    > >
    > >>> Visithttp://www.thinkanddone.com/exams/main.aspx

    > >
    > >> Some of the questions could be better worded, and some of the
    > >> questions are just plain wrong.
    > >>
    > >> --------------
    > >> Dataset 1
    > >> --------------
    > >>
    > >> Question 1 states: A C program is a collection of ______________
    > >> (a) arrays
    > >> (b) variables
    > >> (c) functions
    > >> (d) data types
    > >>
    > >> Neither of these answers are correct, though you state that (c) is the
    > >> answer. A C program is more than a collection of functions. What
    > >> about object declarations? Type declarations? The correct answer
    > >> should be "declarations".

    > >
    > > External declarations.
    > >
    > > A C program consists of:
    > > 1 preprocessor directives
    > > 2 comments
    > > 3 external declarations
    > > 4 extra white space

    >
    > To get a C program you need at least one definition (although a
    > definition is of course also a declaration). If your are including
    > comments in your list, then why not statements?


    Because statments are part of function definitions
    and function definitions are external declarations.

    --
    pete
     
    pete, Oct 6, 2007
    #8
  9. Dexter

    pete Guest

    pete wrote:
    >
    > Flash Gordon wrote:
    > >
    > > pete wrote, On 06/10/07 09:47:
    > > > wrote:
    > > >> On Oct 6, 5:22 pm, Dexter <> wrote:
    > > >
    > > >>> Visithttp://www.thinkanddone.com/exams/main.aspx
    > > >
    > > >> Some of the questions could be better worded, and some of the
    > > >> questions are just plain wrong.
    > > >>
    > > >> --------------
    > > >> Dataset 1
    > > >> --------------
    > > >>
    > > >> Question 1 states: A C program is a collection of ______________
    > > >> (a) arrays
    > > >> (b) variables
    > > >> (c) functions
    > > >> (d) data types
    > > >>
    > > >> Neither of these answers are correct,
    > > >> though you state that (c) is the
    > > >> answer. A C program is more than
    > > >> a collection of functions. What
    > > >> about object declarations? Type declarations?
    > > >> The correct answer should be "declarations".
    > > >
    > > > External declarations.
    > > >
    > > > A C program consists of:
    > > > 1 preprocessor directives
    > > > 2 comments
    > > > 3 external declarations
    > > > 4 extra white space

    > >
    > > To get a C program you need at least one definition (although a
    > > definition is of course also a declaration). If your are including
    > > comments in your list, then why not statements?

    >
    > Because statments are part of function definitions
    > and function definitions are external declarations.


    N869

    6.9 External definitions

    [#4] As discussed in 5.1.1.1, the unit of program text after
    preprocessing is a translation unit, which consists of a
    sequence of external declarations.

    --
    pete
     
    pete, Oct 6, 2007
    #9
  10. Dexter

    Guest

    On Oct 6, 8:27 pm, pete <> wrote:
    > pete wrote:
    >
    > > Flash Gordon wrote:

    >
    > > > pete wrote, On 06/10/07 09:47:
    > > > > wrote:
    > > > >> On Oct 6, 5:22 pm, Dexter <> wrote:

    >
    > > > >>> Visithttp://www.thinkanddone.com/exams/main.aspx

    >
    > > > >> Some of the questions could be better worded, and some of the
    > > > >> questions are just plain wrong.

    >
    > > > >> --------------
    > > > >> Dataset 1
    > > > >> --------------

    >
    > > > >> Question 1 states: A C program is a collection of ______________
    > > > >> (a) arrays
    > > > >> (b) variables
    > > > >> (c) functions
    > > > >> (d) data types

    >
    > > > >> Neither of these answers are correct,
    > > > >> though you state that (c) is the
    > > > >> answer. A C program is more than
    > > > >> a collection of functions. What
    > > > >> about object declarations? Type declarations?
    > > > >> The correct answer should be "declarations".

    >
    > > > > External declarations.

    >
    > > > > A C program consists of:
    > > > > 1 preprocessor directives
    > > > > 2 comments
    > > > > 3 external declarations
    > > > > 4 extra white space

    >
    > > > To get a C program you need at least one definition (although a
    > > > definition is of course also a declaration). If your are including
    > > > comments in your list, then why not statements?

    >
    > > Because statments are part of function definitions
    > > and function definitions are external declarations.

    >
    > N869
    >
    > 6.9 External definitions
    >
    > [#4] As discussed in 5.1.1.1, the unit of program text after
    > preprocessing is a translation unit, which consists of a
    > sequence of external declarations.
    >
    > --
    > pete


    The question would need to be qualified as "preprocessed C program"
    for it to be precise

    Regards,
    B.
     
    , Oct 6, 2007
    #10
  11. Dexter

    Dexter Guest

    On Oct 6, 1:10 pm, Army1987 <> wrote:
    > On Sat, 06 Oct 2007 00:22:53 -0700, Dexter wrote:
    > > My site is home to series of quizzes ranging from Accounting,
    > > Business, Math to programming languages. These are multiple choice
    > > type questions and you get a score card at end.

    >
    > > For C language, I have 3 set of quizzes that anyone is welcome to try
    > > online for free.
    > > Questions on C quizzes are rather easy to solve for Professional C
    > > programmers yet for those who are taking C as a first programming
    > > course will find these useful in assesment their C
    > > knowledge

    >
    > > Visithttp://www.thinkanddone.com/exams/main.aspx

    >
    > I found something wrong already at the first level.
    > Question 3 is:
    > 3 . Its given that variable x has been assigned a value of 5, which of the following statement will output the message "I am quite right"
    > if (x!=5) printf("I am quite right");
    > if (x=5) printf("I am quite right");
    > both statements will display the message
    > none of the above
    > The second statement will assign 5 to x (which happens to already
    > have that value, but that's irrelevant) and, since the result of
    > that assignment can never be zero, it will execute the expression
    > statement consisting of the printf call. So I checked the second
    > answer, but the test believes the correct answer to be "none of
    > the above".
    >
    > --
    > Army1987 (Replace "NOSPAM" with "email")
    > A hamburger is better than nothing.
    > Nothing is better than eternal happiness.
    > Therefore, a hamburger is better than eternal happiness.


    I made errors when compiling the examset. Many thanks for your insight
    into C topics

    I have reloaded DataSet1 with error proned question replaced with new
    ones.

    DataSet2 and Dataset3 have been unloaded and will be corrected and
    reloaded later this afternoon
     
    Dexter, Oct 6, 2007
    #11
  12. Dexter

    Army1987 Guest

    On Sat, 06 Oct 2007 05:44:06 -0700, Dexter wrote:

    > On Oct 6, 1:10 pm, Army1987 <> wrote:
    >> On Sat, 06 Oct 2007 00:22:53 -0700, Dexter wrote:
    >> > My site is home to series of quizzes ranging from Accounting,
    >> > Business, Math to programming languages. These are multiple choice
    >> > type questions and you get a score card at end.

    >>
    >> > For C language, I have 3 set of quizzes that anyone is welcome to try
    >> > online for free.
    >> > Questions on C quizzes are rather easy to solve for Professional C
    >> > programmers yet for those who are taking C as a first programming
    >> > course will find these useful in assesment their C
    >> > knowledge

    >>
    >> > Visithttp://www.thinkanddone.com/exams/main.aspx

    >>
    >> I found something wrong already at the first level.
    >> Question 3 is:
    >> 3 . Its given that variable x has been assigned a value of 5, which of the following statement will output the message "I am quite right"
    >> if (x!=5) printf("I am quite right");
    >> if (x=5) printf("I am quite right");
    >> both statements will display the message
    >> none of the above
    >> The second statement will assign 5 to x (which happens to already
    >> have that value, but that's irrelevant) and, since the result of
    >> that assignment can never be zero, it will execute the expression
    >> statement consisting of the printf call. So I checked the second
    >> answer, but the test believes the correct answer to be "none of
    >> the above".
    >>

    > I made errors when compiling the examset. Many thanks for your insight
    > into C topics
    >
    > I have reloaded DataSet1 with error proned question replaced with new
    > ones.


    I think that the point you were trying to verify with that
    question, namely the difference between comparison and assignment,
    is important, but using zeroes instead of fives you could verify
    it without the test expecting a factually incorrect answer.
    --
    Army1987 (Replace "NOSPAM" with "email")
    A hamburger is better than nothing.
    Nothing is better than eternal happiness.
    Therefore, a hamburger is better than eternal happiness.
     
    Army1987, Oct 6, 2007
    #12
  13. Dexter

    Army1987 Guest

    On Sat, 06 Oct 2007 04:47:25 -0400, pete wrote:

    > wrote:
    >>
    >> On Oct 6, 5:22 pm, Dexter <> wrote:

    >
    >> > Visithttp://www.thinkanddone.com/exams/main.aspx

    >
    >> Some of the questions could be better worded, and some of the
    >> questions are just plain wrong.
    >>
    >> --------------
    >> Dataset 1
    >> --------------
    >>
    >> Question 1 states: A C program is a collection of ______________
    >> (a) arrays
    >> (b) variables
    >> (c) functions
    >> (d) data types
    >>
    >> Neither of these answers are correct, though you state that (c) is the
    >> answer. A C program is more than a collection of functions. What
    >> about object declarations? Type declarations? The correct answer
    >> should be "declarations".

    >
    > External declarations.
    >
    > A C program consists of:
    > 1 preprocessor directives
    > 2 comments
    > 3 external declarations
    > 4 extra white space

    You should make up your mind. Is the program the set of
    preprocessing-files or of (preprocessed) translation units? In the
    former case, they are made by groups of lines, and each line is
    either a directive or it isn't. At this level, doing that
    distinction is not very useful, as external declarations could be
    built with macros and/or other IOCCC preprocessing trickery.
    In the latter case, after preprocessing (translation phases 1-4)
    there are no more comments, and translation units are made of
    external declarations. See A.2.4 and A.3.

    --
    Army1987 (Replace "NOSPAM" with "email")
    A hamburger is better than nothing.
    Nothing is better than eternal happiness.
    Therefore, a hamburger is better than eternal happiness.
     
    Army1987, Oct 6, 2007
    #13
  14. Dexter

    Army1987 Guest

    On Sat, 06 Oct 2007 08:18:57 +0000, borophyll wrote:

    > On Oct 6, 5:22 pm, Dexter <> wrote:
    >> For C language, I have 3 set of quizzes that anyone is welcome to try
    >> online for free.
    >> Questions on C quizzes are rather easy to solve for Professional C
    >> programmers yet for those who are taking C as a first programming
    >> course will find these useful in assesment their C
    >> knowledge
    >>
    >> Visithttp://www.thinkanddone.com/exams/main.aspx

    > Some of the questions could be better worded, and some of the
    > questions are just plain wrong.
    >
    > --------------
    > Dataset 1
    > --------------
    > Question 6: I don't like the wording of this question. The term
    > "assignment" here I think is not really correct

    Well, ++E is defined in terms of (E+=1), so the distinction is
    really immaterial.
    > ---------------
    > Dataset 2
    > ---------------
    > Question 9: Sorry, your answer is wrong. You declare an array of 10
    > characters. You can fit 10 characters in it. The answer is not 9.
    > There is no rule that the last element of an array of char must be a
    > null character. And even if there was, the null character is *still*
    > a character!

    IIRC it talks about strings. Anyway, since the null is part of the
    string, but the length of a string is defined as the number of
    characters excluding the null, the wording shoul be "of length 9"
    not "of 9 characters".
    --
    Army1987 (Replace "NOSPAM" with "email")
    A hamburger is better than nothing.
    Nothing is better than eternal happiness.
    Therefore, a hamburger is better than eternal happiness.
     
    Army1987, Oct 6, 2007
    #14
  15. Dexter

    pete Guest

    Army1987 wrote:
    >
    > On Sat, 06 Oct 2007 04:47:25 -0400, pete wrote:
    >
    > > wrote:
    > >>
    > >> On Oct 6, 5:22 pm, Dexter <> wrote:

    > >
    > >> > Visithttp://www.thinkanddone.com/exams/main.aspx

    > >
    > >> Some of the questions could be better worded, and some of the
    > >> questions are just plain wrong.
    > >>
    > >> --------------
    > >> Dataset 1
    > >> --------------
    > >>
    > >> Question 1 states: A C program is a collection of ______________
    > >> (a) arrays
    > >> (b) variables
    > >> (c) functions
    > >> (d) data types
    > >>
    > >> Neither of these answers are correct,
    > >> though you state that (c) is the
    > >> answer. A C program is more than a collection of functions. What
    > >> about object declarations? Type declarations? The correct answer
    > >> should be "declarations".

    > >
    > > External declarations.
    > >
    > > A C program consists of:
    > > 1 preprocessor directives
    > > 2 comments
    > > 3 external declarations
    > > 4 extra white space

    > You should make up your mind. Is the program the set of
    > preprocessing-files or of (preprocessed) translation units?


    No.
    A program is the source files.
    Have you ever written a C program?

    N869
    5.1.1.1 Program structure
    [#1] A C program need not all be translated at the same
    time. The text of the program is kept in units called
    source files, (or preprocessing files) in this International
    Standard.

    --
    pete
     
    pete, Oct 6, 2007
    #15
  16. On Sat, 06 Oct 2007 13:09:38 -0400, pete wrote:
    > Army1987 wrote:
    >> On Sat, 06 Oct 2007 04:47:25 -0400, pete wrote:
    >> > wrote:
    >> >> Neither of these answers are correct, though you state that (c) is
    >> >> the
    >> >> answer. A C program is more than a collection of functions. What
    >> >> about object declarations? Type declarations? The correct answer
    >> >> should be "declarations".
    >> >
    >> > External declarations.
    >> >
    >> > A C program consists of:
    >> > 1 preprocessor directives
    >> > 2 comments
    >> > 3 external declarations
    >> > 4 extra white space

    >> You should make up your mind. Is the program the set of
    >> preprocessing-files or of (preprocessed) translation units?

    >
    > No.
    > A program is the source files.


    In other words, the preprocessing files (from the text you quoted).
    Preprocessing files consist of lines, not external declarations. The
    preprocessed translation unit will consist of external declarations, but
    the preprocessed translation unit is not a source file.

    > Have you ever written a C program?


    Was that necessary?
     
    =?iso-2022-kr?q?=1B=24=29CHarald_van_D=0E=29=26=0F, Oct 6, 2007
    #16
  17. Dexter

    pete Guest

    =?iso-2022-kr?q?=1B=24=29CHarald_van_D=0E=29=26=0Fk?= wrote:
    >
    > On Sat, 06 Oct 2007 13:09:38 -0400, pete wrote:
    > > Army1987 wrote:
    > >> On Sat, 06 Oct 2007 04:47:25 -0400, pete wrote:
    > >> > wrote:
    > >> >> Neither of these answers are correct, though you state that (c) is
    > >> >> the
    > >> >> answer. A C program is more than a collection of functions. What
    > >> >> about object declarations? Type declarations? The correct answer
    > >> >> should be "declarations".
    > >> >
    > >> > External declarations.
    > >> >
    > >> > A C program consists of:
    > >> > 1 preprocessor directives
    > >> > 2 comments
    > >> > 3 external declarations
    > >> > 4 extra white space
    > >> You should make up your mind. Is the program the set of
    > >> preprocessing-files or of (preprocessed) translation units?

    > >
    > > No.
    > > A program is the source files.

    >
    > In other words, the preprocessing files (from the text you quoted).


    Yes. I said the wrong thing.

    > Preprocessing files consist of lines, not external declarations. The
    > preprocessed translation unit will
    > consist of external declarations, but
    > the preprocessed translation unit is not a source file.
    >
    > > Have you ever written a C program?

    >
    > Was that necessary?


    Thinking about what writing a C program involves,
    should give you some idea of what a C program is.

    --
    pete
     
    pete, Oct 6, 2007
    #17
  18. Dexter

    ¬a\\/b Guest

    In data Sat, 06 Oct 2007 13:56:48 -0400, pete scrisse:
    >=?iso-2022-kr?q?=1B=24=29CHarald_van_D=0E=29=26=0Fk?= wrote:
    >>
    >> On Sat, 06 Oct 2007 13:09:38 -0400, pete wrote:
    >> > Army1987 wrote:
    >> >> On Sat, 06 Oct 2007 04:47:25 -0400, pete wrote:
    >> >> > wrote:
    >> >> >> Neither of these answers are correct, though you state that (c) is
    >> >> >> the
    >> >> >> answer. A C program is more than a collection of functions. What
    >> >> >> about object declarations? Type declarations? The correct answer
    >> >> >> should be "declarations".
    >> >> >
    >> >> > External declarations.
    >> >> >
    >> >> > A C program consists of:
    >> >> > 1 preprocessor directives
    >> >> > 2 comments
    >> >> > 3 external declarations
    >> >> > 4 extra white space
    >> >> You should make up your mind. Is the program the set of
    >> >> preprocessing-files or of (preprocessed) translation units?
    >> >
    >> > No.
    >> > A program is the source files.

    >>
    >> In other words, the preprocessing files (from the text you quoted).

    >
    >Yes. I said the wrong thing.
    >
    >> Preprocessing files consist of lines, not external declarations. The
    >> preprocessed translation unit will
    >> consist of external declarations, but
    >> the preprocessed translation unit is not a source file.
    >>
    >> > Have you ever written a C program?

    >>
    >> Was that necessary?

    >
    >Thinking about what writing a C program involves,
    >should give you some idea of what a C program is.


    A C program is a written text that follow the definitions of the C
    language text definitions
     
    ¬a\\/b, Oct 6, 2007
    #18
  19. Dexter

    santosh Guest

    ¬a\/b wrote:

    > In data Sat, 06 Oct 2007 13:56:48 -0400, pete scrisse:
    >>=?iso-2022-kr?q?=1B=24=29CHarald_van_D=0E=29=26=0Fk?= wrote:
    >>>
    >>> On Sat, 06 Oct 2007 13:09:38 -0400, pete wrote:
    >>> > Army1987 wrote:
    >>> >> On Sat, 06 Oct 2007 04:47:25 -0400, pete wrote:
    >>> >> > wrote:
    >>> >> >> Neither of these answers are correct, though you state that
    >>> >> >> (c) is the
    >>> >> >> answer. A C program is more than a collection of functions.
    >>> >> >> What
    >>> >> >> about object declarations? Type declarations? The correct
    >>> >> >> answer should be "declarations".
    >>> >> >
    >>> >> > External declarations.
    >>> >> >
    >>> >> > A C program consists of:
    >>> >> > 1 preprocessor directives
    >>> >> > 2 comments
    >>> >> > 3 external declarations
    >>> >> > 4 extra white space
    >>> >> You should make up your mind. Is the program the set of
    >>> >> preprocessing-files or of (preprocessed) translation units?
    >>> >
    >>> > No.
    >>> > A program is the source files.
    >>>
    >>> In other words, the preprocessing files (from the text you quoted).

    >>
    >>Yes. I said the wrong thing.
    >>
    >>> Preprocessing files consist of lines, not external declarations. The
    >>> preprocessed translation unit will
    >>> consist of external declarations, but
    >>> the preprocessed translation unit is not a source file.
    >>>
    >>> > Have you ever written a C program?
    >>>
    >>> Was that necessary?

    >>
    >>Thinking about what writing a C program involves,
    >>should give you some idea of what a C program is.

    >
    > A C program is a written text that follow the definitions of the C
    > language text definitions


    A C source file is written text. A C program is an executable which was
    compiled from a C source file.
     
    santosh, Oct 6, 2007
    #19
  20. Dexter

    Karl Heinze Guest

    On Sat, 06 Oct 2007 00:22:53 -0700, Dexter <>
    wrote:

    >
    > Visit http://www.thinkanddone.com/exams/main.aspx
    >


    There's an error here:

    3 . Its given that variable x has been assigned a value of 5, which of
    the following statement will output the message "I am quite right"

    o if (x!=5) printf("I am quite right");
    o if (x=5) printf("I am quite right");
    o both statements will display the message
    o none of the above

    You say "none of the above" is the correct answer; but actually "if
    (x=5) printf("I am quite right");" is the correct answer.


    K. H.

    --

    E-mail: info<at>simple-line<Punkt>de
     
    Karl Heinze, Oct 6, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nani
    Replies:
    0
    Views:
    415
  2. chinni
    Replies:
    0
    Views:
    411
    chinni
    Nov 20, 2009
  3. chinni
    Replies:
    0
    Views:
    464
    chinni
    Nov 20, 2009
  4. Tony Mobily
    Replies:
    1
    Views:
    97
    James Edward Gray II
    Feb 23, 2006
  5. James Gray

    Final Two Quizzes

    James Gray, Jan 28, 2008, in forum: Ruby
    Replies:
    31
    Views:
    331
    James Gray
    Feb 1, 2008
Loading...

Share This Page