(Info) Test Your C Programming Strengths

K

Kishor

Hi Friends

Click here : www.c4swimmers.esmartguy.com to Test Your C Programming
Strengths.
You can find Tricky Questions on C, Interview type queries on C,
Infrequently Answered Questions in C and many more...

Thank You

Regards
Kishor
 
C

Christopher Benson-Manica

Kishor said:
Click here : (url removed) to Test Your C Programming

Hm, let me try a few of those printf questions:

[Q001] - Undefined behavior, since main() must return an int.
[Q002] - Undefined behavior, since main() must return an int.
[Q003] - Undefined behavior, since main() must return an int.
[Q004] - Undefined behavior, since main() must return an int.
[Q005] - Undefined behavior, since main() must return an int.
[Q006] - Undefined behavior, since main() must return an int.

Oh well, this is getting boring. Back to work.
 
E

Eric Sosman

Kishor said:
Hi Friends

Click here : www.c4swimmers.esmartguy.com to Test Your C Programming
Strengths.
You can find Tricky Questions on C, Interview type queries on C,
Infrequently Answered Questions in C and many more...

Anyone who asserts that

"Also, this [C] is the ONLY language which has survived
in the computing world."

is clearly not a smart guy. I looked no further.

(ObPuzzle: Find *two* errors in the quoted sentence.)
 
R

Richard Heathfield

Kishor said:
Hi Friends

Click here : www.c4swimmers.esmartguy.com to Test Your C Programming
Strengths.
You can find Tricky Questions on C, Interview type queries on C,
Infrequently Answered Questions in C and many more...

Please learn the language before attempting to teach it. Thank you.
 
K

Keith Thompson

What is this, a test on how many errors you can find on the site? Sorry,
I gave up after I ran out of fingers.

I'm not surprised that there were that many errors; I'm just surprised
that you had the patience to find 1024 of them.
 
D

Darrell Grainger

Hi Friends

Click here : [URL snipped] to Test Your C Programming
Strengths.
You can find Tricky Questions on C, Interview type queries on C,
Infrequently Answered Questions in C and many more...

Did anyone read the guestbook? He has hundreds of people who think his
site is great. Be afraid, be very afraid.
 
T

Thomas Matthews

Kishor said:
Hi Friends

Click here : www.c4swimmers.esmartguy.com to Test Your C Programming
Strengths.
You can find Tricky Questions on C, Interview type queries on C,
Infrequently Answered Questions in C and many more...

Thank You

Regards
Kishor

Please get rid of those damn pop-up windows.
You state that the programs will compiler under Turbo C/C++ compiler.
Guess what! A lot has changed since then. Borland is now on
revision 6 or their compiler and version 5 can be downloaded for
free.

I gave up after the 4th invocation of undefined behavior.
I believe you need to get a copy of the ANSI specification
for the language.

On your "scanf" section. All the FAQs and advice in this newsgroup
specifically state to avoid the function. So, why do you put
it into your test?

Your web page is nuking my browser. Bad page, bad page.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
C

Christopher Benson-Manica

Darrell Grainger said:
Did anyone read the guestbook? He has hundreds of people who think his
site is great. Be afraid, be very afraid.

Two words: sock puppets.
 
A

Arthur J. O'Dwyer

On your "scanf" section. All the FAQs and advice in this newsgroup
specifically state to avoid the function. So, why do you put
it into your test?

If "Kishor" actually knew C, 'scanf' would be a great thing to put
on a "test" or "FAQ" page. 'scanf' *can* be used safely, believe it
or not; sometimes it's even the most effective way to get things done.
Why else would it still be around? ;) But it takes a bit of skill
to write 'scanf' code that always works properly.
That skill would be a great thing to test! You know, with questions
like

Write a program that parses a text file in format X and outputs
the values it finds in fields Y and Z.

for some values of X,Y,Z. Unfortunately, "Kishor" has filled his/her
page with garbage like

What does this program do?
scanf("Hello\'u my friends,%d%g%h%i%j@87kdf", &p);

that doesn't show any understanding of the language, the concepts,
or the proper discipline required to write really good code. And
that's just bad.
[I wouldn't be too "afraid, very afraid," about the guestbook
entries. Looks like personal friends of "Kishor," presumably also
in whatever beginning C course he/she is.]

-Arthur
 
R

Richard Heathfield

caroundw5h said:
Doesnt' that site needs to be updated. They seem to still be using void
main().

No, not updated; just corrected. The "void main" construct has never been
correct C.
 
J

Jack Klein

Hi Friends

Click here : www.c4swimmers.esmartguy.com to Test Your C Programming
Strengths.
You can find Tricky Questions on C, Interview type queries on C,
Infrequently Answered Questions in C and many more...

Thank You

Regards
Kishor

I disagree with what my esteemed colleague Richard Heathfield said, as
I am wont to do from time to time.

Please DON'T learn C and then try to teach it.

Please, PLEASE, learn C# instead and try to teach it in Microsoft
groups for that language, not here.
 
J

Joona I Palaste

Ah, yes, "void main()" which was part of standard C way back NEVER.

I have often wondered where not only newbies, but book authors, got the
idea that void main() was any form of C at all. As you and Richard
correctly say, void main() was never used in any form of standard C,
and it wasn't used in K&R C either. (They simply used main().) Have
those people invented it out of thin air and then started convincing
themselves it was standard C?
 
R

Richard Bos

Keith Thompson said:
I'm not surprised that there were that many errors; I'm just surprised
that you had the patience to find 1024 of them.

I wasn't counting; I was gnawing one off out of frustration with every
blunder I found.

Then, before posting, I grew them back on again. Sometimes I think I
must have lizard genes, or something.

Richard
 
L

Leor Zolman

I have often wondered where not only newbies, but book authors, got the
idea that void main() was any form of C at all. As you and Richard
correctly say, void main() was never used in any form of standard C,
and it wasn't used in K&R C either. (They simply used main().) Have
those people invented it out of thin air and then started convincing
themselves it was standard C?

Oh, c'mon...it doesn't take a great deal of imagination to see how
void main()
would have made a lot of sense at the time:

1. Using just
main()
defaults to returning int (of course, nowadays it should be made
explicit). What if you wanted to make sure everyone knew you were
_not_ returning an int, or anything else? There was no way to do it
before the void keyword was borrowed from C++, so it seemed like a
relief to finally have a way to express that when void was added to
the language.

2. While

Leor Zolman
BD Software
(e-mail address removed)
www.bdsoft.com -- On-Site Training in C/C++, Java, Perl & Unix
C++ users: Download BD Software's free STL Error Message
Decryptor at www.bdsoft.com/tools/stlfilt.html
 
D

Darrell Grainger

I have often wondered where not only newbies, but book authors, got the
idea that void main() was any form of C at all. As you and Richard
correctly say, void main() was never used in any form of standard C,
and it wasn't used in K&R C either. (They simply used main().) Have
those people invented it out of thin air and then started convincing
themselves it was standard C?

Having taught fist year programming I can tell you were a number of my
students got the idea that "void main()" was acceptable...

If you see "main()" without a return type specified then there is NOTHING
in front of main so the return type is NOTHING, a.k.a. "void main()".

For someone who has never programmed it makes sense, i.e. it is a good
rationalization. Add to this instructors who do not correct the students
and these students grow up to become professional programmers who believe
"void main()" is equivalent to "main()".
 
J

Joona I Palaste

Oh, c'mon...it doesn't take a great deal of imagination to see how
void main()
would have made a lot of sense at the time:
1. Using just
main()
defaults to returning int (of course, nowadays it should be made
explicit). What if you wanted to make sure everyone knew you were
_not_ returning an int, or anything else? There was no way to do it
before the void keyword was borrowed from C++, so it seemed like a
relief to finally have a way to express that when void was added to
the language.

This does not answer the question. *WHY* would you want to make sure
everyone knew you were not returning an int? *WHY* would you not want
to return an int in the first place?

While what?

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"The large yellow ships hung in the sky in exactly the same way that bricks
don't."
- Douglas Adams
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top