Re: Online C Programming Quizzes



On Oct 6, 5:22 pm, Dexter <yousaf.a...@xxxxxxxxx> 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.

.



Relevant Pages

  • Re: assignment expression peeve
    ... > in code is that is it resembles, to some degree, natural language. ... > does not have an analogue that matches syntactically, ... > this is true of assignment expression I won't speculate at this ... programming languages are relatively simple and regular, ...
    (comp.lang.python)
  • Re: Beyond ascii
    ... Only that the character set not be full Unicode. ... One can still write in their own language even in the face of restrictions. ... Certainly there are programming languages whose syntax are so ad-hoc and irregular so that you would expect it to cause a mess, and yet lots of programmers using it for useful applications. ...
    (comp.lang.scheme)
  • Re: [OT] - propagation of incorrect information
    ... > I think we can all see what the character of this document is based on ... and it's somewhat disappointing that kuro5hin would ... language entirely unsuitable for the kind of programming he was doing. ...
    (comp.lang.c)
  • Re: MISRA new rule suggestion
    ... >>> 'jj' or 'cc' for a throw away character, etc. as variable names, ... >>> editor. ... >Most of my work is embedded assembly language programming, ...
    (comp.arch.embedded)
  • Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]
    ... and programming, I'm used to it, but I don't think it is especially good. ... the syntax most commonly used for assignment today sucks. ... that more than any other programming language. ...
    (comp.lang.python)