Common Man
Guest
Posts: n/a

 08-11-2012
On Saturday, August 11, 2012 12:52:04 AM UTC+5:30, Eric Sosman wrote:
> On 8/10/2012 3:17 PM, Keith Thompson wrote:
>
> > Eric Sosman <(E-Mail Removed)> writes:

>
> >>

>
> >> What he's learned thus far is as nothing compared to what he'll

>
> >> learn when he gives my program to his professor ...

>
> >

>
> > He did say elsewhere in this thread that he's studying on his own from a

>
> > book, not doing homework for a class.

>
>
>
> "... and I am Marie of Roumania."
>
>
>
> --
>
> Eric Sosman
>
> http://www.velocityreviews.com/forums/(E-Mail Removed)d

I understood evrything except these lines of 3rd function
for (int d114; ; ++d114) {
>
> if ((d114 = rand() % 0200) > 0) {
>
> for (int d112 = d114; {
>
> if ((d112 = d112 * 0x12d1 % 0177) == d114) {

Anyway I'm trying to understand in my own effort. also I have solved the first question, I will post it for everyone very soon after a little bit of review.I'm a beginner So please pardon my ignorance. But I wish very soon I'll be a master of it.

BartC
Guest
Posts: n/a

 08-11-2012
"Common Man" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> I understood evrything except these lines of 3rd function
> for (int d114; ; ++d114) {
>>
>> if ((d114 = rand() % 0200) > 0) {
>>
>> for (int d112 = d114; {
>>
>> if ((d112 = d112 * 0x12d1 % 0177) == d114) {

> Anyway I'm trying to understand in my own effort. also I have solved the
> first question, I will post it for everyone very soon after a little bit
> of review.I'm a beginner So please pardon my ignorance. But I wish very
> soon I'll be a master of it.

Don't bother. The code is meant to be a joke.

--
Bartc

James Harris
Guest
Posts: n/a

 08-11-2012
On Aug 10, 8:19*pm, Eric Sosman <(E-Mail Removed)> wrote:

....

> * * *My hunch is that he knows little Latin, so even if someone
> said "pri memo dulus" to him he wouldn't understand.

"dulus" --> "dolus"?

James

Nick Keighley
Guest
Posts: n/a

 08-11-2012
On Aug 10, 1:23*pm, Common Man <(E-Mail Removed)> wrote:
> On Friday, August 10, 2012 5:48:37 PM UTC+5:30, Noob wrote:
> > Common Man wrote:

> > > Question Number 1

>
> > > [...]

>
> > > Question number 2

>
> > > [...]

>
> > Could you provide the email address of your instructor, so that

>
> > we may send our answers directly to them?

>

we're more concerned that you instructor get some clarity

osmium
Guest
Posts: n/a

 08-11-2012
"Common Man" wrote:

> On Saturday, August 11, 2012 12:52:04 AM UTC+5:30, Eric Sosman wrote:
>> On 8/10/2012 3:17 PM, Keith Thompson wrote:
>>
>> > Eric Sosman <(E-Mail Removed)> writes:

>>
>> >>

>>
>> >> What he's learned thus far is as nothing compared to what he'll

>>
>> >> learn when he gives my program to his professor ...

>>
>> >

>>
>> > He did say elsewhere in this thread that he's studying on his own from
>> > a

>>
>> > book, not doing homework for a class.

>>
>>
>>
>> "... and I am Marie of Roumania."
>>
>>
>>
>> --
>>
>> Eric Sosman
>>
>> (E-Mail Removed)d

>
>
> I understood evrything except these lines of 3rd function

<snip>

That makes me believe you are not a truth teller. You ARE in a class and
totally lost. the code posted made no sense, and a self-student would at
least realize that.

Eric Sosman
Guest
Posts: n/a

 08-11-2012
On 8/11/2012 10:32 AM, osmium wrote:
>[...]
> That makes me believe you are not a truth teller. You ARE in a class and
> totally lost. the code posted made no sense, and a self-student would at
> least realize that.

"No sense?" The code compiles, executes, and satisfies the
requirements of the question (if you squint enough when reading
and make reasonable assumptions about age ranges). By intention
it is not a strictly conforming program, but it is almost entirely
portable (diagnosing the two small portability problems is left
as an exercise). "No sense?" C'mon!

--
Eric Sosman
(E-Mail Removed)d

osmium
Guest
Posts: n/a

 08-11-2012
"Eric Sosman" wrote:

> On 8/11/2012 10:32 AM, osmium wrote:
>>[...]
>> That makes me believe you are not a truth teller. You ARE in a class and
>> totally lost. the code posted made no sense, and a self-student would
>> at
>> least realize that.

>
> "No sense?" The code compiles, executes, and satisfies the
> requirements of the question (if you squint enough when reading
> and make reasonable assumptions about age ranges). By intention
> it is not a strictly conforming program, but it is almost entirely
> portable (diagnosing the two small portability problems is left
> as an exercise). "No sense?" C'mon!
>
> --
> Eric Sosman

<one handed typing>

I do not consider it sensible to "expose" the instructor as a stupid doofus
who used imprecision in his phrasing of the question. it IS a beginner's
course, after all.

YMMV

Common Man
Guest
Posts: n/a

 08-12-2012
On Saturday, August 11, 2012 8:28:48 PM UTC+5:30, Eric Sosman wrote:
> On 8/11/2012 10:32 AM, osmium wrote:
>
> >[...]

>
> > That makes me believe you are not a truth teller. You ARE in a class and

>
> > totally lost. the code posted made no sense, and a self-student would at

>
> > least realize that.

>
>
>
> "No sense?" The code compiles, executes, and satisfies the
>
> requirements of the question (if you squint enough when reading
>
> and make reasonable assumptions about age ranges). By intention
>
> it is not a strictly conforming program, but it is almost entirely
>
> portable (diagnosing the two small portability problems is left
>
> as an exercise). "No sense?" C'mon!
>
>
>
> --
>
> Eric Sosman
>
> (E-Mail Removed)d

That's what I told. I could not get any sense from that piece of code.

James Kuyper
Guest
Posts: n/a

 08-12-2012
On 08/11/2012 10:44 PM, Common Man wrote:
> On Saturday, August 11, 2012 8:28:48 PM UTC+5:30, Eric Sosman wrote:
>> On 8/11/2012 10:32 AM, osmium wrote:
>>
>>> [...]

>>
>>> That makes me believe you are not a truth teller. You ARE in a class and
>>> totally lost. the code posted made no sense, and a self-student would at
>>> least realize that.

>>
>> "No sense?" The code compiles, executes, and satisfies the
>> requirements of the question (if you squint enough when reading
>> and make reasonable assumptions about age ranges). By intention
>> it is not a strictly conforming program, but it is almost entirely
>> portable (diagnosing the two small portability problems is left
>> as an exercise). "No sense?" C'mon!

....
> That's what I told. I could not get any sense from that piece of code.

That is a more believable statement than your earlier comment that
osmium objected to: "I understood evrything except these lines of 3rd
function". As Bart said, Eric's response was meant as a joke; you will
often get responses like that if you ask a question that looks like
homework, and give no indication that you've made any attempt to work on

If you had even a minimal understanding of C, there should have been
some questions you would have been asking as soon as you finished
understanding the first two functions, even if you had not yet realized
it was a joke:
1. Where are the names and the ages stored after they are read in from
the input file?
2. When the program asks for a name, and the user types it in, where is
the name stored?

Even if you can't figure out the answers to those questions, failing to
even ask them implies a really poor understanding of C. This seems like
a fairly elementary exercise, but it requires an understanding of C
greater than your current level. If you really do want to learn C, I
recommend backing up and working on some simpler exercises before
tackling a problem as complicated as this one.

If you had understood the third function as well, you should have been
3. What is the connection between the names in the data file, the name
that the user types in, and the age that is prints out?

I recommend examining the code carefully to figure out what's wrong with
it - you'll learn some important things about computer programming.
Important point: there's nothing significant wrong with it, as a C
program. The key problem with it is the connection between what that
program does and the instructions you were given. Technically, it obeys
those instructions, but only by completely ignoring the clearly intended
meaning of word "corresponding".
--
James Kuyper