Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Test your C/C++ Skills [Free Online Test]

Reply
Thread Tools

Test your C/C++ Skills [Free Online Test]

 
 
pmp
Guest
Posts: n/a
 
      10-27-2009
free online test of c/c++ try now http://www.itworld2.com
 
Reply With Quote
 
 
 
 
Phil Carmody
Guest
Posts: n/a
 
      10-27-2009
Richard Heathfield <(E-Mail Removed)> writes:
> In <(E-Mail Removed)>,
> pmp wrote:
>
>> free online test of c/c++ try now http://www.itworld2.com

>
> If you take away all the registration stuff, I'll be glad to take a
> look at it.


I'd say that c/c++ is undefined...

Phil
--
Any true emperor never needs to wear clothes. -- Devany on r.a.s.f1
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      10-27-2009
Kenneth Brody <(E-Mail Removed)> writes:
> Phil Carmody wrote:
>> Richard Heathfield <(E-Mail Removed)> writes:
>>> In
>>> <(E-Mail Removed)>,
>>> pmp wrote:
>>>
>>>> free online test of c/c++ try now http://www.itworld2.com
>>> If you take away all the registration stuff, I'll be glad to take a
>>> look at it.

>>
>> I'd say that c/c++ is undefined...

>
> It depends on the definition of "c".
>
> For example, given the definition "const int c;", the expression
> "c/c++" is well defined. (FSVO "defined".)
>
>


It's a constraint violation. The only requirement on the
implementation is that it must produce a diagnostic. Once it's
produced that diagnostic, it's free to continue to translate the
program, which may then execute but whose behavior is not defined
by the standard.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      10-28-2009
Keith Thompson wrote:
> Kenneth Brody <(E-Mail Removed)> writes:
>> Phil Carmody wrote:
>>> Richard Heathfield <(E-Mail Removed)> writes:
>>>> In
>>>> <(E-Mail Removed)>,
>>>> pmp wrote:
>>>>
>>>>> free online test of c/c++ try now http://www.itworld2.com
>>>> If you take away all the registration stuff, I'll be glad to take a
>>>> look at it.
>>> I'd say that c/c++ is undefined...

>> It depends on the definition of "c".
>>
>> For example, given the definition "const int c;", the expression
>> "c/c++" is well defined. (FSVO "defined".)
>>
>>

>
> It's a constraint violation. The only requirement on the
> implementation is that it must produce a diagnostic.


Which, of course, is the 'VI "defined"' to hich Kenneth was referring.

> Once it's
> produced that diagnostic, it's free to continue to translate the
> program, which may then execute but whose behavior is not defined
> by the standard.


True, but it's defined as producing a diagnostic during translation.
--
Flash Gordon
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      10-28-2009
Flash Gordon <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> Kenneth Brody <(E-Mail Removed)> writes:
>>> Phil Carmody wrote:
>>>> Richard Heathfield <(E-Mail Removed)> writes:
>>>>> In
>>>>> <(E-Mail Removed)>,
>>>>> pmp wrote:
>>>>>
>>>>>> free online test of c/c++ try now http://www.itworld2.com
>>>>> If you take away all the registration stuff, I'll be glad to take a
>>>>> look at it.
>>>> I'd say that c/c++ is undefined...
>>> It depends on the definition of "c".
>>>
>>> For example, given the definition "const int c;", the expression
>>> "c/c++" is well defined. (FSVO "defined".)
>>>
>>>

>>
>> It's a constraint violation. The only requirement on the
>> implementation is that it must produce a diagnostic.

>
> Which, of course, is the 'VI "defined"' to hich Kenneth was referring.
>
>> Once it's
>> produced that diagnostic, it's free to continue to translate the
>> program, which may then execute but whose behavior is not defined
>> by the standard.

>
> True, but it's defined as producing a diagnostic during translation.


Pedant!

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      10-28-2009
Kenneth Brody <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> Flash Gordon <(E-Mail Removed)> writes:
>>> Keith Thompson wrote:
>>>> Kenneth Brody <(E-Mail Removed)> writes:
>>>>> Phil Carmody wrote:
>>>>>> Richard Heathfield <(E-Mail Removed)> writes:
>>>>>>> In
>>>>>>> <(E-Mail Removed)>,
>>>>>>> pmp wrote:
>>>>>>>
>>>>>>>> free online test of c/c++ try now http://www.itworld2.com
>>>>>>> If you take away all the registration stuff, I'll be glad to take a
>>>>>>> look at it.
>>>>>> I'd say that c/c++ is undefined...
>>>>> It depends on the definition of "c".
>>>>>
>>>>> For example, given the definition "const int c;", the expression
>>>>> "c/c++" is well defined. (FSVO "defined".)
>>>>>
>>>>>
>>>> It's a constraint violation. The only requirement on the
>>>> implementation is that it must produce a diagnostic.
>>> Which, of course, is the 'VI "defined"' to hich Kenneth was referring.

>
> Thanks.
>
>>>> Once it's
>>>> produced that diagnostic, it's free to continue to translate the
>>>> program, which may then execute but whose behavior is not defined
>>>> by the standard.
>>> True, but it's defined as producing a diagnostic during translation.

>>
>> Pedant!

>
> This group thrives on pedantry.
>
> Okay, what about:
>
> extern void c(void);
>
> Are we in the realm of "must fail to compile" yet?


Nope. The only case where something "must fail to compile" is
when a #error directive survives any #if and #ifdef directives.
In all other cases (constraint violations, syntax rule violations,
undefined behavior, hard drive containing source has lost power), the
compiler is free to proceed after issuing any required diagnostics.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      10-28-2009
Kenneth Brody <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> Kenneth Brody <(E-Mail Removed)> writes:

> [... "c/c++" ...]
>>> Okay, what about:
>>>
>>> extern void c(void);
>>>
>>> Are we in the realm of "must fail to compile" yet?

>>
>> Nope. The only case where something "must fail to compile" is
>> when a #error directive survives any #if and #ifdef directives.
>> In all other cases (constraint violations, syntax rule violations,
>> undefined behavior, hard drive containing source has lost power), the
>> compiler is free to proceed after issuing any required diagnostics.

>
> That's what I remembered after clicking "send".
>
> (And, of course, macros can't expand to preprocessor directives.)
>
> So, technically, syntax rule violations are also UB? (Can a compiler
> print a diagnostic and then reformat the hard drive, and still be
> "conforming"?)


Yes. When you sue the vendor for reformatting your hard drive, you
won't be able to claim that the compiler is non-conforming.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Phil Carmody
Guest
Posts: n/a
 
      10-28-2009
Kenneth Brody <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> Kenneth Brody <(E-Mail Removed)> writes:

> [... "c/c++" ...]
>>> Okay, what about:
>>>
>>> extern void c(void);
>>>
>>> Are we in the realm of "must fail to compile" yet?

>>
>> Nope. The only case where something "must fail to compile" is
>> when a #error directive survives any #if and #ifdef directives.
>> In all other cases (constraint violations, syntax rule violations,
>> undefined behavior, hard drive containing source has lost power), the
>> compiler is free to proceed after issuing any required diagnostics.

>
> That's what I remembered after clicking "send".
>
> (And, of course, macros can't expand to preprocessor directives.)
>
> So, technically, syntax rule violations are also UB? (Can a compiler
> print a diagnostic and then reformat the hard drive, and still be
> "conforming"?)


We prefer to call that model the 'conformatting' version.

Phil
--
Any true emperor never needs to wear clothes. -- Devany on r.a.s.f1
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test Your C/C++ Skills[Free Online Test] pmp C++ 1 10-24-2008 06:22 PM
Test your C++ Skill(Online test C++) preeto50@gmail.com C++ 9 01-04-2008 04:47 PM
Test Your C Skills - Errors Sharath C Programming 24 04-23-2007 09:19 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments