How many levels of pointers can you have?

C

Chris Hills

Joachim Schmitz said:
So what does C89 require as the minmum?

Bye, Jojo

That's irrelevant the C standard is ISO 9899:1999 all other ISO C
standards are technically obsolete.

There is no ISO C 1989.
 
J

Joachim Schmitz

Chris Hills said:
That's irrelevant the C standard is ISO 9899:1999 all other ISO C
standards are technically obsolete.

There is no ISO C 1989.
I doubt that, but anyway: what did ISO C 1989 require back than?

Bye, Jojo
 
K

Keith Thompson

Joachim Schmitz said:
So what does C89 require as the minmum?

12.

C90 5.2.4.1:

12 pointer, array, and function declarators (in any combinations)
modifying an arithmetic, a structure, a union, or an incomplete
type in a declaration

As in C99, an implementation is merely required to translate and
execute a single program that hits all the enumerated limits; there's
no guarantee that it can handle 12 levels in *your* program.
 
R

Richard Heathfield

CBFalconer said:
Joachim said:
Chris is being somewhat doltish here.

That's something I never really understood - what is so doltish about
being *right*.
There never was an ISO C89
because that version was an ANSI standard.

So you're agreeing with Chris. Does that mean you're being doltish too?

Come on, Chuck, please don't insult people for being right.
 
R

Richard Heathfield

Chris Dollin said:
Historical revisionism at its finest.

Read what he said again, more carefully. There is not now, and nor has
there ever been, an ISO C 1989. This is not historical revisionism, but
historical fact.
 
R

Richard Heathfield

Chris Hills said:

They are just advertised as "C compilers" not ISO 989:1999 conforming
C compilers.

The same limit applies to C90 compilers, so I don't see the point of the
distinction.
 
C

Charlton Wilbur

RH> I am, however, a little surprised that you got as far as the
RH> interview stage without you yourself having found out about
RH> their requirements. Two possibilities spring to mind - (a) a
RH> work-cultural difference between your country and mine; (b)
RH> the headhunter was lying to *you*, too. One cannot help but
RH> wonder what his motivation was, though.

I'd vote for (b). I've had some miserable experiences with
recruiters; in one case, the employer was willing to offer $20,000 a
year less than the salary that the recruiter had offered me. I
discovered this in the interview, and in the end it turned out I would
have been almost comically overqualified for the job.

I've also had similar experiences to Eric Sosman; this is why I insist
on sending out my resume *only* as a PDF, and why I insist on emailing
a copy to the company myself before any interview.

I've found, too, that recruiters have a really tenuous grasp on
geography; I had one pursuing me about a year ago for a job coding web
services in Java on Windows, approximately 200 miles from where I
live. When I explained that (a) I had no programming experience with
Java; (b) my last experience with programming on the Windows platform
was in approximately 1993; and (c) I intended neither to relocate nor
commute 200 miles a day, she insisted repeatedly that this was the
opportunity of a lifetime for me. Someone else's lifetime, perhaps!

Charlton
 
C

Charlton Wilbur

MMcL> If people are coming to you claiming two years' experience
MMcL> as a C programmer developing desktop apps with Blogg's
MMcL> corps, or possessing a degree in computer studies, and
MMcL> seemingly now knowing basic things, then you really need to
MMcL> look at what is going on. Whilst the candidate is trying to
MMcL> sell himself and put a good gloss on his achievements,
MMcL> outright lying is relatively rare, and in Britain at least
MMcL> is illegal. It could be that people are elevating trivial
MMcL> exposure to something into wide experience, but then you
MMcL> might be making the mistake of saying "we need someone who
MMcL> knows how to log on to Unix".

Most of the time, it's been people who overestimate their level of
ability. They know a few buzzwords and think they're experts.

The last position I interviewed candidates for was that of a junior
web designer. The idea was to find someone who understood HTML, CSS,
and a little bit of design, and could take a design and turn it into a
webpage. We got around 30 resumes.

My favorite interview question with that lot was "Why doesn't <site
from your portfolio> validate as compliant HTML?" Now, the correct
answers are "Huh? What's that?" and "We had a constraint that made it
prohibitively expensive." Only two candidates answered correctly; one
the former, one the latter. The rest tried to explain to me that
standards compliance didn't matter, or that because Dreamweaver spit
out the HTML and it worked in Internet Explorer *of course* it was
valid, and the W3C validator was just Wrong. And this was for a job
posting that talked about standards-compliant web design explicitly.

(We hired the one who answered "huh? what's that?" -- on the theory
that it would be easier to train someone who was honest about what he
didn't know than someone who was prepared to cover up his ignorance
with a line of bafflegab.)

Charlton
 
C

Charlton Wilbur

RH> That's something I never really understood - what is so
RH> doltish about being *right*.

The doltishness is not in being right; the doltishness is in
recognizing that the question is about what C89 requires, and instead
of saying "ISO C was standardized in 1990, so it's ISO C90," and then
answering the question, pretending that the querent is an idiot for
not realizing that he should have asked about ANSI C 1989 or ISO C
1990.

Charlton
 
M

Morris Dovey

Charlton Wilbur wrote:

| (We hired the one who answered "huh? what's that?" -- on the theory
| that it would be easier to train someone who was honest about what
| he didn't know than someone who was prepared to cover up his
| ignorance with a line of bafflegab.)

Interesting story! Coincidentally, some of my most interesting
projects have been those I made honest efforts to back away from - on
the basis of insufficient knowledge - and ended up being hired by
people who had determined that the lack would not be a serious
obstacle. To my considerable surprise, they were all correct.
(Probably worth mentioning that they were first-level project managers
and not HR types.)
 
J

Joachim Schmitz

Keith Thompson said:
12.

C90 5.2.4.1:

12 pointer, array, and function declarators (in any combinations)
modifying an arithmetic, a structure, a union, or an incomplete
type in a declaration
Thanks! Finaly a useful answer to what I meant to ask...

Bye, Jojo
 
M

Malcolm McLean

Charlton Wilbur said:
MMcL> If people are coming to you claiming two years' experience
MMcL> as a C programmer developing desktop apps with Blogg's
MMcL> corps, or possessing a degree in computer studies, and
MMcL> seemingly now knowing basic things, then you really need to
MMcL> look at what is going on. Whilst the candidate is trying to
MMcL> sell himself and put a good gloss on his achievements,
MMcL> outright lying is relatively rare, and in Britain at least
MMcL> is illegal. It could be that people are elevating trivial
MMcL> exposure to something into wide experience, but then you
MMcL> might be making the mistake of saying "we need someone who
MMcL> knows how to log on to Unix".

Most of the time, it's been people who overestimate their level of
ability. They know a few buzzwords and think they're experts.

The last position I interviewed candidates for was that of a junior
web designer. The idea was to find someone who understood HTML, CSS,
and a little bit of design, and could take a design and turn it into a
webpage. We got around 30 resumes.

My favorite interview question with that lot was "Why doesn't <site
from your portfolio> validate as compliant HTML?" Now, the correct
answers are "Huh? What's that?" and "We had a constraint that made it
prohibitively expensive."
I doubt my website would "validate as compliant HTML". That's because I edit
all the files in a plain text editor. It is too difficult to balance all the
tags, for instance, so I don't bother.
Since I use a very conservative subset of HTML, it is unlikely to break on
any browser, and it seems OK in all I've used. If it does break in someone's
wonderful new whizzy effort that's a pity, but it will only be one or two
people.

So the correct answer in my case is "the standards don't matter [enough]".
If it was a departmental rather than a personal site, this wouldn't be
acceptable. They have to use CSS and the like. However for a personal site,
the priority is that I can put pages up easily and edit them easily. And it
works, I've got the fifth most popular site at Leeds University.

Now actually I would be a poor candidate for junior web designer, not
because I couldn't do it but because I would want to do something more
advanced. However you are not filtering me out for the right reason, but for
an erroneous one.
 
C

Chris Dollin

Richard said:
Chris Dollin said:


Read what he said again, more carefully. There is not now, and nor has
there ever been, an ISO C 1989. This is not historical revisionism, but
historical fact.

Oops.
 
B

BiGYaN

Ben Pfaff said:
Subject: How many levels of pointers can you have?
This question is occur in interview. Please help me.

5.2.4.1 Translation limits
1 The implementation shall be able to translate and execute at
least one program that contains at least one instance of
every one of the following limits:13)
[...]
- 12 pointer, array, and function declarators (in any
combinations) modifying an arithmetic, structure, union,
or incomplete type in a declaration

Yes, but like all the limits in 5.2.4.1, it doesn't necessarily mean
very much. A conforming implementation is merely required to
translate and execute *one* program that hits all the listed limits.
Another program with 12 levels of pointers might fail to compile.

The point of the requirement, I think, is that the easiest way to
satisify it is not to have any fixed limits at all, by making the
relevant data structures within the compiler dynamic. A typical
compiler most likely won't complain about 13, or 20, or 99 levels of
pointers (unless it issues a warning).

--
Keith Thompson (The_Other_Keith) (e-mail address removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


Thanks for the info Keith .... I did not know all these.
 
C

Chris Hills

CBFalconer said:
Joachim said:
Chris is being somewhat doltish here.

No just as pedantic as those on here who get VERY silly about
conformance. You can have it both ways.

There never was an ISO C89
because that version was an ANSI standard.

Ie a local US standard.
ISO took it over, did
some paragraph renumbering, and issued it otherwise unchanged as
C90.

There was unfortunately ,in my opinion, a whole section dropped.
 
C

Chris Hills

Chris said:
Thank you,.

There are many pedants on here trying to be holier than thou about C
conformance but play fast and loose with what standard C is. They
include K&R, ANSI, ISO and CD's

I made a comment that due to implementation there many not be 12 levels
of pointers. Getting stupid and saying "it is not C" is pointless. As I
pointed out 95% of the worlds C compilers do not conform the standard.

Being a pedant to the theoretical standards is pointless. Reality is
different.
 
C

Chris Hills

Joachim Schmitz said:
Thanks! Finaly a useful answer to what I meant to ask...

Bye, Jojo

Absolutely not.

As I keep pointing out you have to check the compiler docs on each
implementation for this.

C90 is obsolete.
C99 IS the standard.

Most compilers do not meet the ISO C standard. Many implementations
deviated from C90 too.

So in REALITY you have to look at the documents to see what your C
compiler will actually do.
 
R

Richard

Richard Heathfield said:
Eric Sosman said:



One possible defence is to take your own copy of your CV to the
interview, so that you can show it to the interviewer during your
apology (which apology, by rights, the *headhunter* should be making).

I am, however, a little surprised that you got as far as the interview
stage without you yourself having found out about their requirements.
Two possibilities spring to mind - (a) a work-cultural difference
between your country and mine; (b) the headhunter was lying to *you*,
too. One cannot help but wonder what his motivation was, though. Trying
to bang Eric-shaped pegs into non-Eric-shaped holes must surely be a
losing proposition for all concerned.

There is a third. This is a fabricated story.

You don't "fire headhunters".

Headhunters come and find you. It's why they are called Head Hunters.

No competent "Headhunter" who is looking for a specialist would do this
CV manipulation.

1) They lose all credibility
2) They would inform the candidate about the companies needs

If "headhunter" is bigging up the name for a placing agent then fair
enough - those rats would do anything for a quick placement.
For the record, if I'd been the interviewer I'd have said, "what, THE
Eric Sosman? Okay, never mind, we have THIS job for you instead..."

--
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top