473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

some C questions


Hai all,

I have some question. Please answer.

1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
--
With Regards
Guru Jois

May 23 '07 #1
22 1724
Guru Jois said:
>
Hai all,

I have some question. Please answer.

1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
This is a discussion newsgroup, not a free homework service.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 23 '07 #2
"Guru Jois" <gu*******@gmail.comschrieb im Newsbeitrag
news:11**********************@k79g2000hse.googlegr oups.com...
>
Hai all,

I have some question. Please answer.

1. What is walking pointer?
2. What is difference between procedure and subroutine?
Neither is a C term. C has functions
3. What is template of main in C?
template is a C++ term. OT here. If you ment prototype instead: in ANSI C
main has 2 valid prototypes (for hosted environments), int main(void) and
int main(int argc, char *argv[]). So it alwasy returns an int and takes
either no argument at all or an int and a char** (or char*[], which is the
same thing in this context)
4. What is padding of structure ( or structure padding )?
The implementation might elect to add padding bytes between (or at the end?)
of struct elements, so a struct might end up being bigger in sizes that the
sum of it's content.
5. What is advantages of using pointers to functions?.
Advantage against what?

--
With Regards
Guru Jois
Bye, Jojo
May 23 '07 #3
"Guru Jois" <gu*******@gmail.comschrieb im Newsbeitrag
news:11**********************@k79g2000hse.googlegr oups.com...
>
Hai all,

I have some question. Please answer.

1. What is walking pointer?
http://www.bronze-gallery.com/sculpt...&sculptorID=38

8-)) SCNR

Bye, Jojo
May 23 '07 #4
Guru Jois a écrit :
Hai all,

I have some question. Please answer.

1. What is walking pointer?
A temporary to hold a floating point value.
2. What is difference between procedure and subroutine?
A procedure returns an int, a subroutine returns a double.
3. What is template of main in C?
void main(char *arguments);
4. What is padding of structure ( or structure padding )?
Makes a structure a multiple of 5 (power pc), of 8 (intel) or 3
(MacIntosh)
5. What is advantages of using pointers to functions?.
Pointers to functions are useful for detecting errors
and filling arrays with zeroes.
>

--
With Regards
Guru Jois

I hope it helps :-)
May 23 '07 #5
Guru Jois wrote:
Hai all,

I have some question. Please answer.

1. What is walking pointer?
One of several breeds of dog used in hunting birds and
other small game. When fully trained, the dog will "hold a
point," standing immobile to signal to the hunter the location
of the prey. A walking pointer is a dog whose training is
imperfect.
2. What is difference between procedure and subroutine?
Zero. C has functions, but not procedures or subroutines.
The difference between nothing and nothing is nothing.
3. What is template of main in C?
There are no templates in C, so the answer is:
4. What is padding of structure ( or structure padding )?
Structure padding is the use of extraneous materials to
enhance the shape of a struct and make it more attractive to
members of the opposite struct. (See also "struct silicone.")
5. What is advantages of using pointers to functions?.
It is better to point to a function than to point to your
eye with a sharp stick.

I hope these answers are helpful. If you are interested in
improving your knowledge still more, try this additional question:

6. What benefits accrue to the student who does his own homework?

--
Eric Sosman
es*****@acm-dot-org.invalid
May 23 '07 #6
Eric Sosman wrote:
>
Guru Jois wrote:
Hai all,

I have some question. Please answer.

1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
6. What benefits accrue to the student who does his own homework?
Dubious.
The homework questions, especially questions #2 and #3,
don't inspire faith in the course material.

--
pete
May 23 '07 #7

"pete" <pf*****@mindspring.comschrieb im Newsbeitrag
news:46***********@mindspring.com...
Eric Sosman wrote:
>>
Guru Jois wrote:
Hai all,

I have some question. Please answer.

1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
>6. What benefits accrue to the student who does his own homework?

Dubious.
The homework questions, especially questions #2 and #3,
don't inspire faith in the course material.
And that's exactly why I tried to give a more usefull answer to the OP...

Bye, Jojo
May 23 '07 #8
Guru Jois wrote:
1. What is walking pointer?
No idea...

2. What is difference between procedure and subroutine?
In C, ca. 16 % 8

3. What is template of main in C?
A confused C++ programmer

4. What is padding of structure ( or structure padding )?
Wasted memory

5. What is advantages of using pointers to functions?.
Main advantage is to show off, hey I'm an expert C programmer!

--
Tor <torust [at] online [dot] no>

May 23 '07 #9
Eric Sosman wrote:
>
Guru Jois wrote:
Hai all,

I have some question. Please answer.
[...]
2. What is difference between procedure and subroutine?

Zero. C has functions, but not procedures or subroutines.
The difference between nothing and nothing is nothing.
Strange. On my DS-6000, the result of:

printf("%d\n",procedure-subroutine);

is:

37

[...]
4. What is padding of structure ( or structure padding )?

Structure padding is the use of extraneous materials to
enhance the shape of a struct and make it more attractive to
members of the opposite struct. (See also "struct silicone.")
Some systems pad with winsocks.

[...]
I hope these answers are helpful. If you are interested in
improving your knowledge still more, try this additional question:

6. What benefits accrue to the student who does his own homework?
He can feed himself for a lifetime.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
May 23 '07 #10
On 23 May, 15:55, Guru Jois <guru.j...@gmail.comwrote:
On May 23, 7:00 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
"pete" <pfil...@mindspring.comschrieb im Newsbeitragnews:46***********@mindspring.com...
Eric Sosman wrote:
>Guru Jois wrote:
I have some question. Please answer.
1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
>6. What benefits accrue to the student who does his own homework?
Dubious.
The homework questions, especially questions #2 and #3,
don't inspire faith in the course material.
And that's exactly why I tried to give a more usefull answer to the OP...

These were asked in C test !!!!!!
so what? This merely indicates your teacher is nearly (presumably he's
getting paid) as stupid as you are.
I realized these are not related to
C, but it was a test, so had to answer.
so why didn't you?
--
Nick Keighley

May 24 '07 #11
In article <f3**********@usenet01.boi.hp.com>, Joachim Schmitz
<no************@hp.comwrites
>"Guru Jois" <gu*******@gmail.comschrieb im Newsbeitrag
news:11**********************@k79g2000hse.googleg roups.com...
>>
Hai all,

I have some question. Please answer.

1. What is walking pointer?
http://www.bronze-gallery.com/sculpt...&sculptorID=38
Brilliant!!!
:-)

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 24 '07 #12
In article <11**********************@o5g2000hsb.googlegroups. com>, Nick
Keighley <ni******************@hotmail.comwrites
>On 23 May, 15:55, Guru Jois <guru.j...@gmail.comwrote:
>On May 23, 7:00 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
"pete" <pfil...@mindspring.comschrieb im
Newsbeitragnews:46***********@mindspring.com...
Eric Sosman wrote:
Guru Jois wrote:
I have some question. Please answer.
1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
>6. What benefits accrue to the student who does his own homework?
Dubious.
The homework questions, especially questions #2 and #3,
don't inspire faith in the course material.
And that's exactly why I tried to give a more usefull answer to the OP...

These were asked in C test !!!!!!

so what? This merely indicates your teacher is nearly (presumably he's
getting paid) as stupid as you are.
Hang one.... you don't know that yet. If you were faced with these
questions in an exam what would you say? Especially if a job or
qualification depended on it.
>I realized these are not related to
C, but it was a test, so had to answer.
so why didn't you?
He "had to answer" in which case he has answered but I suspect is not
happy and wants to know what others would have said.

Now he knows the reaction of others I think it is time for him to post
his own answers and we can discuss what the hell we would have done
faced with an exam like that (other than walk out) sometimes feeding
the family comes just ahead of principals......

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 24 '07 #13
In article <11*********************@h2g2000hsg.googlegroups.c om>, Guru
Jois <gu*******@gmail.comwrites
>On May 23, 7:00 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
>"pete" <pfil...@mindspring.comschrieb im
Newsbeitragnews:46***********@mindspring.com.. .
Eric Sosman wrote:
>Guru Jois wrote:
Hai all,
I have some question. Please answer.
1. What is walking pointer?
2. What is difference between procedure and subroutine?
3. What is template of main in C?
4. What is padding of structure ( or structure padding )?
5. What is advantages of using pointers to functions?.
>6. What benefits accrue to the student who does his own homework?
Dubious.
The homework questions, especially questions #2 and #3,
don't inspire faith in the course material.

And that's exactly why I tried to give a more usefull answer to the OP...

Bye, Jojo

These were asked in C test !!!!!! I realized these are not related to
C, but it was a test, so had to answer.

Bye
Guru Jois

OK... So what did YOU answer in the test?
Where was this test?
What was it for?
Ps there have been some wonderful answers so far.... they have made my
day.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 24 '07 #14
On Wed, 23 May 2007 02:17:28 -0700, Guru Jois wrote:
>
Hai all,

I have some question. Please answer.

1. What is walking pointer?
If you're asking what I think you're asking, it's the process of iterating
through an array by incrementing a pointer, as below:

void copy(char *src, char *dst)
{
while(*src)
*dst++ = *src++;
*dst = 0;
}

Basically, we're "walking" through the src and dst arrays by incrementing
the pointers.
2. What is difference between procedure and subroutine?
Practically speaking, none. Some languages such as Fortran and Ada
distinguish between subroutines that return a value (functions) vs.
subroutines that don't return a value (procedures) with different syntax
and semantics (e.g., using different keywords to define the subroutine, or
preventing you from modifying input parameters of a function). C doesn't
make this distinction; all subroutines are functions.
3.What is template of main in C?
The standard prototypes for main are:

int main(void);
int main(int argc, char **argv);

Individual implementations may define additional prototypes, but
must support at least those two.
4. What is padding of structure ( or structure padding )?
Most architectures require that multibyte objects (ints, floats, doubles,
etc.) start on addresses that are multiples of 2 or 4. If you have a
struct that has a single char member followed by an int member, the
compiler will "pad" the struct so that the int member starts on the next
even address, so you wind up with a dummy byte between the members.
5. What is advantages of using pointers to functions?.
There are a number of advantages, from allowing for plug-in architectures
to introducing basic polymorphism. Unfortunately, I have to run out of
here before I can come up with any decent examples. It's something that
won't make sense until you've done a little more programming, anyway.
May 24 '07 #15
Eric Sosman <es*****@acm-dot-org.invalidwrites:
Structure padding is the use of extraneous materials to
enhance the shape of a struct and make it more attractive to
members of the opposite struct. (See also "struct silicone.")
I just got a new signature.
--
"It wouldn't be a new C standard if it didn't give a
new meaning to the word `static'."
--Peter Seebach on C99
May 24 '07 #16
Groovy hepcat Guru Jois was jivin' on 23 May 2007 02:17:28 -0700 in
comp.lang.c.
some C questions's a cool scene! Dig it!
>I have some question. Please answer.
Yes, Master.
>1. What is walking pointer?
That's when one leads a hunting dog on a leash.
>2. What is difference between procedure and subroutine?
The latter has ten letters, while the former has only nine.
>3. What is template of main in C?
Something one uses as a guide to cut fabric to shape when making a
dress. However, templates are not used in C. And main is the name of a
function, not a dress. I suggest you find a dressmaking newsgroup if
you wish to discuss templates.
>4. What is padding of structure ( or structure padding )?
A structure can be thought of as a container, a cell. Now, structure
padding makes it a padded cell. And in that padded cell, you'll find
me and my friend, Barney. He's a leprechaun, y'know.
>5. What is advantages of using pointers to functions?.
Well, ummmmmmm... Oh yeah! Everyone loves a dog. Right? Well, you
wouldn't want a dead dog, would you? Of course not. You'd want him up
and running around, alive and well; or, in other words, fully
functional. Yes, you want your pointer to function, don't you? Of
course you do.

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
May 27 '07 #17
On May 24, 2:21 pm, John Bode <john_b...@my-deja.comwrote:
On Wed, 23 May 2007 02:17:28 -0700, Guru Jois wrote:
Hai all,
I havesomequestion. Please answer.
1. What is walking pointer?

If you're asking what I think you're asking, it's the process of iterating
through an array by incrementing a pointer, as below:

void copy(char *src, char *dst)
{
while(*src)
*dst++ = *src++;
*dst = 0;

}

Basically, we're "walking" through the src and dst arrays by incrementing
the pointers.
2. What is difference between procedure and subroutine?

Practically speaking, none. Somelanguages such as Fortran and Ada
distinguish between subroutines that return a value (functions) vs.
subroutines that don't return a value (procedures) with different syntax
and semantics (e.g., using different keywords to define the subroutine, or
preventing you from modifying input parameters of a function). Cdoesn't
make this distinction; all subroutines are functions.
3.What is template of main inC?

The standard prototypes for main are:

int main(void);
int main(int argc, char **argv);

Individual implementations may define additional prototypes, but
must support at least those two.
4. What is padding of structure ( or structure padding )?

Most architectures require that multibyte objects (ints, floats, doubles,
etc.) start on addresses that are multiples of 2 or 4. If you have a
struct that has a single char member followed by an int member, the
compiler will "pad" the struct so that the int member starts on the next
even address, so you wind up with a dummy byte between the members.
5. What is advantages of using pointers to functions?.

There are a number of advantages, from allowing for plug-in architectures
to introducing basic polymorphism. Unfortunately, I have to run out of
here before I can come up with any decent examples. It's something that
won't make sense until you've done a little more programming, anyway.
GOOD SUGGESTION COMPARED TO ALL OTHERS.
Thank you John Bode

I hope you should assist everyone to how to answer for the questions.
Giving irrelevant answers doesn't mirrors their expertness in C. If
you all find my question irrelevant, why didn't John Bode??
Hope you follow good path of Mr Bode.

Bye
Guru Jois

May 29 '07 #18
In article <11**********************@g37g2000prf.googlegroups .com>, Guru
Jois <gu*******@gmail.comwrites
>On May 24, 2:21 pm, John Bode <john_b...@my-deja.comwrote:
>On Wed, 23 May 2007 02:17:28 -0700, Guru Jois wrote:
Hai all,
I havesomequestion. Please answer.
1. What is walking pointer?

If you're asking what I think you're asking, it's the process of iterating
through an array by incrementing a pointer, as below:

void copy(char *src, char *dst)
{
while(*src)
*dst++ = *src++;
*dst = 0;

}

Basically, we're "walking" through the src and dst arrays by incrementing
the pointers.
2. What is difference between procedure and subroutine?

Practically speaking, none. Somelanguages such as Fortran and Ada
distinguish between subroutines that return a value (functions) vs.
subroutines that don't return a value (procedures) with different syntax
and semantics (e.g., using different keywords to define the subroutine, or
preventing you from modifying input parameters of a function). Cdoesn't
make this distinction; all subroutines are functions.
3.What is template of main inC?

The standard prototypes for main are:

int main(void);
int main(int argc, char **argv);

Individual implementations may define additional prototypes, but
must support at least those two.
4. What is padding of structure ( or structure padding )?

Most architectures require that multibyte objects (ints, floats, doubles,
etc.) start on addresses that are multiples of 2 or 4. If you have a
struct that has a single char member followed by an int member, the
compiler will "pad" the struct so that the int member starts on the next
even address, so you wind up with a dummy byte between the members.
5. What is advantages of using pointers to functions?.

There are a number of advantages, from allowing for plug-in architectures
to introducing basic polymorphism. Unfortunately, I have to run out of
here before I can come up with any decent examples. It's something that
won't make sense until you've done a little more programming, anyway.

GOOD SUGGESTION COMPARED TO ALL OTHERS.
Thank you John Bode

I hope you should assist everyone to how to answer for the questions.
No. Many of us know how to answer these questions. But we don't do
home work.
>Giving irrelevant answers doesn't mirrors their expertness in C. If
you all find my question irrelevant, why didn't John Bode??
Hope you follow good path of Mr Bode.

Bye
Guru Jois
From Guru's email to me re a book on compiler design....
Mr Hills,
*** Thanks for your suggestion. I now realize I don't need that book.
Any
way can I know in which company you are working?. I am Master of
Computer Application graduate and currently studying "Advanced C and
Unix" course in Uttara, Bangalore, India.
*Have you heard about UTTARA in Bangalore?

Bye
Guru Jois


--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 29 '07 #19
On May 29, 5:04 pm, Chris Hills <c...@phaedsys.orgwrote:
In article <1180432199.553430.252...@g37g2000prf.googlegroups .com>, Guru
Jois <guru.j...@gmail.comwrites
On May 24, 2:21 pm, John Bode <john_b...@my-deja.comwrote:
On Wed, 23 May 2007 02:17:28 -0700, Guru Jois wrote:
Hai all,
I havesomequestion. Please answer.
1. What is walking pointer?
If you're asking what I think you're asking, it's the process of iterating
through an array by incrementing a pointer, as below:
void copy(char *src, char *dst)
{
while(*src)
*dst++ = *src++;
*dst = 0;
}
Basically, we're "walking" through the src and dst arrays by incrementing
the pointers.
2. What is difference between procedure and subroutine?
Practically speaking, none. Somelanguages such as Fortran and Ada
distinguish between subroutines that return a value (functions) vs.
subroutines that don't return a value (procedures) with different syntax
and semantics (e.g., using different keywords to define the subroutine, or
preventing you from modifying input parameters of a function). Cdoesn't
make this distinction; all subroutines are functions.
3.What is template of main inC?
The standard prototypes for main are:
int main(void);
int main(int argc, char **argv);
Individual implementations may define additional prototypes, but
must support at least those two.
4. What is padding of structure ( or structure padding )?
Most architectures require that multibyte objects (ints, floats, doubles,
etc.) start on addresses that are multiples of 2 or 4. If you have a
struct that has a single char member followed by an int member, the
compiler will "pad" the struct so that the int member starts on the next
even address, so you wind up with a dummy byte between the members.
5. What is advantages of using pointers to functions?.
There are a number of advantages, from allowing for plug-in architectures
to introducing basic polymorphism. Unfortunately, I have to run out of
here before I can come up with any decent examples. It's something that
won't make sense until you've done a little more programming, anyway.
GOOD SUGGESTION COMPARED TO ALL OTHERS.
Thank you John Bode
I hope you should assist everyone to how to answer for thequestions.

No. Many of us know how to answer thesequestions. But we don't do
home work.
Giving irrelevant answers doesn't mirrors their expertness inC. If
you all find my question irrelevant, why didn't John Bode??
Hope you follow good path of Mr Bode.
Bye
Guru Jois

From Guru's email to me re a book on compiler design....
Mr Hills,
Thanks for your suggestion. I now realize I don't need that book.
Any
way can I know in which company you are working?. I am Master of
Computer Application graduate and currently studying "AdvancedCand
Unix" course in Uttara, Bangalore, India.
Have you heard about UTTARA in Bangalore?
>
Bye
Guru Jois

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/c...@phaedsys.org www.phaedsys.org\/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
No.. This doesn't sounds home work sir. You can think that a new-to-c
student wants to know answer to certain question. I posted it here
after failing to find it in google. You (all) would have first
answered it relevantly and then guide that the question should be
asked so and so, as John Bode did.

bye
Guru Jois

May 30 '07 #20
On May 29, 4:49 am, Guru Jois <guru.j...@gmail.comwrote:
On May 24, 2:21 pm, John Bode <john_b...@my-deja.comwrote:
On Wed, 23 May 2007 02:17:28 -0700, Guru Jois wrote:
Hai all,
I havesomequestion. Please answer.
[snip questions and answers]
>
GOOD SUGGESTION COMPARED TO ALL OTHERS.
Thank you John Bode

I hope you should assist everyone to how to answer for the questions.
You're assuming facts not necessarily in evidence; namely, that I know
what the hell I'm talking about. Plenty of people in this newsgroup
will tell you that I'm prone to saying really stupid shit sometimes.
Giving irrelevant answers doesn't mirrors their expertness in C. If
you all find my question irrelevant, why didn't John Bode??
You caught me on a good day. Seriously, my initial response was going
to be "do your own homework" as well, but then thought, it's either
respond to this or write documentation.

I really hate writing documentation.
Hope you follow good path of Mr Bode.
I'd rather they follow the paths of a) being right, and b) not helping
kids cheat on their homework.

Jun 15 '07 #21
On Thu, 24 May 2007 04:21:24 -0500, John Bode <jo*******@my-deja.com>
wrote:
On Wed, 23 May 2007 02:17:28 -0700, Guru Jois wrote:
<snip other homework>
2. What is difference between procedure and subroutine?

Practically speaking, none. Some languages such as Fortran and Ada
distinguish between subroutines that return a value (functions) vs.
subroutines that don't return a value (procedures) with different syntax
and semantics (e.g., using different keywords to define the subroutine, or
preventing you from modifying input parameters of a function).
Fortran and Pascal use different keywords: FUNCTION vs SUBROUTINE and
FUNCTION vs PROCEDURE respectively. Ada and PL/I use the same keyword
PROCEDURE for both (PL/I allows abbreviations of all keywords and this
one is usually abbreviated PROC) but require inclusion or omission of
a clause with the keyword RETURN or RETURNS respectively.
C doesn't make this distinction; all subroutines are functions.
Well, all routine types use the same syntax; but C functions with a
return type of void (colloquially, void functions) correspond to
non-function procedures/subroutines in other languages and do differ
in some minor respects from functions with a non-void return type
(colloquially, non-void functions).

- formerly david.thompson1 || achar(64) || worldnet.att.net
Jul 1 '07 #22
David Thompson <da************@verizon.netwrites:
[...]
Fortran and Pascal use different keywords: FUNCTION vs SUBROUTINE and
FUNCTION vs PROCEDURE respectively. Ada and PL/I use the same keyword
PROCEDURE for both (PL/I allows abbreviations of all keywords and this
one is usually abbreviated PROC) but require inclusion or omission of
a clause with the keyword RETURN or RETURNS respectively.
[...]

<OT>Correction: Ada has separate "procedure" and "function"
keywords.</OT>

--
Keith Thompson (The_Other_Keith) 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"
Jul 1 '07 #23

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

Similar topics

2
by: Ross Micheals | last post by:
All I have some general .NET questions that I'm looking for some help with. Some of these questions (like the first) are ones that I've seen various conflicting information on, or questions that...
12
by: Vibhajha | last post by:
Hi friends, My sister is in great problem , she has this exam of C++ and she is stuck up with some questions, if friends like this group provides some help to her, she will be very grateful....
1
by: Tony Johansson | last post by:
Hello Experts! I have some questions about inheritance that I want to have an answer to. It says "Abstract superclasses define a behavioral pattern without specifying the implementation" I...
162
by: techievasant | last post by:
hello everyone, Iam vasant from India.. I have a test+interview on C /C++ in the coming month so plz help me by giving some resources of FAQS, interview questions, tracky questions, multiple...
50
by: Jatinder | last post by:
I 'm a professional looking for the job.In interview these questions were asked with some others which I answered.But some of them left unanswered.Plz help. Here are some questions on C/C++, OS...
24
by: Kevin | last post by:
Hey guys. I'm looking to get together some VB programmers on Yahoo messenger. I sit at a computer and program all day. I have about 3 or 4 people already, but it would be really cool to have a...
7
by: changs | last post by:
Hi, all I have a asm code, I suspect it sort of socket programming. Can anyone here give some instructions on how to determine the function or give the psudo-code in C? Thanks in advance! ...
3
by: iKiLL | last post by:
Hi all I am building an Windows Mobile 5 forms control in C#, for a Windows Mobile 5 application. I am using CF2.0 and SQL Mobile 2005. The control is a Questions and answer control.
4
by: Mr. X. | last post by:
Hello. I need some help, please. What can an employee ask (technical questions), if I am interviewed of Dot-net developer (also VB.NET and C#). (What are the most general questions, that I may...
30
by: GeorgeRXZ | last post by:
Hi Friends, I have some questions related to C Language. 1What is the difference between the standard C language and Non standard C language ? 2which is better C Lanugage, C under Linux/...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.