473,686 Members | 2,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How many levels of pointers can you have?

This question is occur in interview. Please help me.

Jun 6 '07
158 9031

"madhawi" <ma*******@gmai l.comwrote in message
news:11******** *************@z 28g2000prd.goog legroups.com...
This question is occur in interview. Please help me.
You might know you might not.
The point is that the standard imposes some limit which is way above the
number of dereferences any paractical programmer would ever need. All
computers will eventually run out of memory if you try to impose a stupidly
large number, even if it is 4 billion.

As it stands it is rather a bad question. It tells you who knows every
irrelevant detail of the stnadard, but that only has a slight correlation to
broader abilities. However remember that the interviewer isn't really
interested in technical ability - he knows that from your CV - he wants to
find out what sort of person you are. So given that you don't know, how do
you handle that? If you can do it in a graceful and relaxed manner, but not
too arrogant - they are looking for teamworking skills, aka obedience, after
all - then you should do well.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Jun 7 '07 #21
On Jun 7, 3:49 am, "Kira" <a...@n.tkwrote :
I wonder if anybody ever made a non toy program
with 12 levels of pointers.
Here's a program that uses 11 levels of pointers.
(It would have 12 but avoided the last level with
a "micro-optimization.")

http://james.fabpedigree.com/wnim.htm

Since the program was written in response
to a "non-life threatening" query in rec.puzzles,
I suppose it could be considered a "toy",
but the webpage poses a challenge: If this is
not the best way to solve the stated problem,
what is?

jamesdowallen at gmail
Jun 7 '07 #22
James Dow Allen <jd*********@ya hoo.comwrote:
On Jun 7, 3:49 am, "Kira" <a...@n.tkwrote :
I wonder if anybody ever made a non toy program
with 12 levels of pointers.

Here's a program that uses 11 levels of pointers.
(It would have 12 but avoided the last level with
a "micro-optimization.")

http://james.fabpedigree.com/wnim.htm

Since the program was written in response
to a "non-life threatening" query in rec.puzzles,
I suppose it could be considered a "toy",
but the webpage poses a challenge: If this is
not the best way to solve the stated problem,
what is?
I'd have devised a way to encode the board, perhaps in a string, perhaps
in an unsigned long long if possible, and then used a one-dimensional
table of those. That's easier to extend to larger boards, for one thing.

Richard
Jun 7 '07 #23
Malcolm McLean wrote:
"madhawi" <ma*******@gmai l.comwrote in message
>This question is occur in interview. Please help me.

You might know you might not. The point is that the standard
imposes some limit which is way above the number of dereferences
any paractical programmer would ever need. All computers will
eventually run out of memory if you try to impose a stupidly
large number, even if it is 4 billion.
Why? All the dereference requires is to replace the pointer with
what it points to. Repeat as each '*' appears in the input. At
most this requires games with the input stream, such as counting
'*'s while advancing to the base pointer.

--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 7 '07 #24
Kenneth Brody <ke******@spamc op.netwrote:
>
Now _there's_ a question for the standards committee... Where did
they pick the number 12 from?
As I recall, that was the limit in Ritchie's original compiler and no
one ever complained that it was too small, so the committee went with
it.

-Larry Jones

Even though we're both talking english, we're not speaking the same language.
-- Calvin
Jun 7 '07 #25
la************@ ugs.com writes:
Kenneth Brody <ke******@spamc op.netwrote:
>Now _there's_ a question for the standards committee... Where did
they pick the number 12 from?

As I recall, that was the limit in Ritchie's original compiler and no
one ever complained that it was too small, so the committee went with
it.

-Larry Jones
Somebody here said that K&R (presumably the first edition) guarantees
6 levels. I don't have my copy handy to check this, but presumably
that would match what Ritchie's original compiler supported.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <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"
Jun 7 '07 #26
>>>>"MML" == Malcolm McLean <re*******@btin ternet.comwrite s:

MMLHowever remember that the interviewer isn't really interested
MMLin technical ability - he knows that from your CV -

Er, you haven't seen some of the resumes I've seen, then, and
subsequently interviewed the candidates with the same name at the top
of the resume. The technical ability described on the resume may have
nothing at all to do with the technical ability possessed by the
candidate, and it is an irresponsible interviewer who does not
evaluate the candidate in front of him separately from what the resume
claims.

Charlton


--
Charlton Wilbur
cw*****@chromat ico.net
Jun 8 '07 #27
Charlton Wilbur wrote:
>>>>>"MML" == Malcolm McLean <re*******@btin ternet.comwrite s:

MMLHowever remember that the interviewer isn't really interested
MMLin technical ability - he knows that from your CV -

Er, you haven't seen some of the resumes I've seen, then, and
subsequently interviewed the candidates with the same name at the top
of the resume. The technical ability described on the resume may have
nothing at all to do with the technical ability possessed by the
candidate, and it is an irresponsible interviewer who does not
evaluate the candidate in front of him separately from what the resume
claims.
Seconded. I once found myself in a most embarrassing position
as an interviewee for a post I was not qualified for (nor interested
in). About five minutes into the interview, after I had answered
the Nth question in a row with "I dunno," the interviewer asked me
why in the world my resume claimed expertise in this area I was so
obviously unfamiliar with. I asked to see the resume, and to my
horror discovered that my headhunter had transformed my original
into a complete fabrication: He'd left my name intact, but just
invented most of the rest. I disavowed the fiction and promptly
on the next morning fired the headhunter -- but the damage was done;
even if the firm in question had a job for which I *was* suited, I
doubt they'd have hired me after that fiasco.

There are diligent and capable headhunters out there, but there
are also some utter sleazebags. "Trust, but verify."

--
Eric Sosman
es*****@acm-dot-org.invalid

Jun 9 '07 #28
Eric Sosman said:

<snip>
I once found myself in a most embarrassing position
as an interviewee for a post I was not qualified for (nor interested
in). About five minutes into the interview, after I had answered
the Nth question in a row with "I dunno," the interviewer asked me
why in the world my resume claimed expertise in this area I was so
obviously unfamiliar with. I asked to see the resume, and to my
horror discovered that my headhunter had transformed my original
into a complete fabrication: He'd left my name intact, but just
invented most of the rest. I disavowed the fiction and promptly
on the next morning fired the headhunter -- but the damage was done;
even if the firm in question had a job for which I *was* suited, I
doubt they'd have hired me after that fiasco.
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.

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..."

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 9 '07 #29
Richard Heathfield wrote:
[...]
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..."
A thousand thanks, but in that long-past time I was
not yet THE Eric Sosman; I was just Eric Sosman, young and
dumb. Nowadays I'm THE Eric Sosman, senile but cunning.

--
Eric Sosman
es*****@acm-dot-org.invalid

Jun 9 '07 #30

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

Similar topics

6
13715
by: Angus | last post by:
I am using a global which is a void* I have it defined in one file as: void* hFlag; and one other header file as: extern void* hFlag; But I get this compile error:
0
8586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8523
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8776
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8781
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...
1
6444
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
4313
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...
0
4537
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2210
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1943
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.