473,734 Members | 2,514 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Online C Programming Quizzes

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

Oct 6 '07 #1
23 3651
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.

Oct 6 '07 #2
On Oct 6, 5:22 pm, Dexter <yousaf.a...@gm ail.comwrote:
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.thinkanddon e.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 "declaratio ns".

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 '07 #3
bo*******@gmail .com 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
Oct 6 '07 #4
bo*******@gmail .com wrote:
>
On Oct 6, 5:22 pm, Dexter <yousaf.a...@gm ail.comwrote:
Visithttp://www.thinkanddon e.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 "declaratio ns".
External declarations.

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

--
pete
Oct 6 '07 #5
On Oct 6, 6:43 pm, pete <pfil...@mindsp ring.comwrote:
boroph...@gmail .com 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 '07 #6
pete wrote, On 06/10/07 09:47:
bo*******@gmail .com wrote:
>On Oct 6, 5:22 pm, Dexter <yousaf.a...@gm ail.comwrote:
>>Visithttp://www.thinkanddon e.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 "declaratio ns".

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
Oct 6 '07 #7
Flash Gordon wrote:
>
pete wrote, On 06/10/07 09:47:
bo*******@gmail .com wrote:
On Oct 6, 5:22 pm, Dexter <yousaf.a...@gm ail.comwrote:
>Visithttp://www.thinkanddon e.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 "declaratio ns".
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
Oct 6 '07 #8
pete wrote:
>
Flash Gordon wrote:

pete wrote, On 06/10/07 09:47:
bo*******@gmail .com wrote:
>On Oct 6, 5:22 pm, Dexter <yousaf.a...@gm ail.comwrote:
>
>>Visithttp://www.thinkanddon e.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 "declaratio ns".
>
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
Oct 6 '07 #9
On Oct 6, 8:27 pm, pete <pfil...@mindsp ring.comwrote:
pete wrote:
Flash Gordon wrote:
pete wrote, On 06/10/07 09:47:
boroph...@gmail .com wrote:
On Oct 6, 5:22 pm, Dexter <yousaf.a...@gm ail.comwrote:
>Visithttp://www.thinkanddon e.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 "declaratio ns".
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 "preprocess ed C program"
for it to be precise

Regards,
B.

Oct 6 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2165
by: vpd | last post by:
hi, I want some help in organising an online programming contest. Is there a ready made solution available in PHP or even Perl which I could use? The contest is supposed to be based on C programming and the solutions submitted by the participants must be compiled, executed and the marks shall be allocated automatically. I want some urgent help as the contest is supposed to be organised in just a couple of days. Any suggestions and...
13
2714
by: Varun | last post by:
Hi Friends, Department of Information Technology, Madras Institute of Technology, Anna University, India is conducting a technical symposium, Samhita. As a part of samhita, an Online Programming Contest is scheduled on Sunday, 27 Feb 2005. This is the first Online Programming Contest in India to support Python !!!!. Other languages supported are C and C++.
0
1332
by: Sridhar | last post by:
Hi, We, the students of CEG, Anna University are organizing an online programming contest as part of aBaCus 2005. The contest itself will start on 6th March 2005 at 1:00 pm IST and will end after 5 hours. You have to solve the problems posted at the start of the contest. Teams ranking high will be awarded the prizes. As a special note, inspite of C,C++ and Java we also allow Python this time. So we hope a lot of Pythonistas...
0
1621
by: Sridhar | last post by:
Hi, We, the students of CEG, Anna University are organizing an online programming contest as part of aBaCus 2005. The contest itself will start on 6th March 2005 at 1:00 pm IST and will end after 5 hours. You have to solve the problems posted at the start of the contest. Teams ranking high will be awared the prizes. As a special note, inspite of C,C++ and Java we also allow Python this time. So we hope a lot of Pythonistas...
1
4568
by: Doron | last post by:
Hi, anybody familiar with any online PL/SQL programming courses I can look up on the web?
14
1664
by: pravink | last post by:
Hi all, I am interested in knowing any periodic (montly/weekly) programming challeages held on internet...Does anybody know about such sites? Focus should be on algorithm development and programming skills. For example, I found this (http://www.mactech.com/progchallenge/)...but seems they have stopped it now... thanks in advance, pravink
0
945
by: ravehanker | last post by:
Hello There! College of Engineering, Guindy announces the Kurukshetra Online Programming Contest as a part of it's Inter-departmental Tech. Fest, Kurukshetra. The event is your opportunity to compete with the World's best coders with algorithm-centric problems that will rattle your grey matter! The event is to be held on December 31th and is open to all.
0
1357
by: Romram | last post by:
BITWISE is an annual online programming contest. The contest is organized by the Computer Science and Engineering Department Society of IIT Kharagpur, on the second Sunday of February every year. The contest is time constrained and you would be expected to submit solutions to some of the toughest programming and algorithms challenges in a short span of 12 hours. Prizes worth 120,000 Rs or $2600 at stake. Visit...
0
1327
by: Turbo | last post by:
Please ignore if you are not interested in programming contests. IIIT Hyderabad invites you to our annual Online Programming Contest CodeCraft 2007. This is the 5th year of Codecraft. It has grown over the years and has witnessed huge participation on a global scale. The contest is known for having a high quality problemset. It will be held on February 21st, 2007, 6 PM - 12 AM IST. ( GMT 1230 hrs - 1830 hrs).
0
9452
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9184
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6737
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6033
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4551
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3262
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.