473,385 Members | 1,973 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,385 software developers and data experts.

need information on the following items

Hi,

I want some info on the following items....send me what ever info u
have pls.....

1) Segmentaion Voilation

2) Shared Objects files

3) Virtual Functions

4) How can I call a c function in a c++ program and vice versa?

5) what is the default size of a stack and heap ?

6) Signalling in UNIX

Pls do the needful. Thank you.

Jan 3 '06 #1
17 1547

"Rajnee Kanth" <ra*********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi,

I want some info on the following items....send me what ever info u
have pls.....

1) Segmentaion Voilation

2) Shared Objects files

3) Virtual Functions

4) How can I call a c function in a c++ program and vice versa?

5) what is the default size of a stack and heap ?

6) Signalling in UNIX

Pls do the needful. Thank you.


3/4 - go and ask on comp.lang.c++

5 - C knows nothing about such things

6 - ask on a Unix group

2 - what do you mean?

1 - you accesses memory you didn't own
Jan 3 '06 #2
Rajnee Kanth wrote:
Hi,

I want some info on the following items....send me what ever info u
have pls.....

1) Segmentaion Voilation
Never heard of it. I've been writing programs (and
bugs) for forty years, and this is the first mention of
"Segmentaion" or of "Voilation" I've seen. This must be
some kind of new technology you should ask your professor
about; I'm too far behind the times to help you.
2) Shared Objects files
No such thing. C objects are memory-resident; data in
a file does not qualify as an object.
3) Virtual Functions
You've misspelled "virtuous." A virtuous function is one
that has no side-effects; these are also called "pure" functions.
4) How can I call a c function in a c++ program and vice versa?
Not possible, in either direction. All functions in
a C program are C, so there are no C++ functions to call.
Similarly, a C++ program contains only C++ functions (some
may look a lot like C, but if they reside in a C++ program
the C++ rules prevail).
5) what is the default size of a stack and heap ?
Stack: twenty-three plates, two with chips on the rims.
Heap: 2.2 cubic yards of rapidly hardening concrete.
6) Signalling in UNIX
UNIX is off-topic here. Try alt.lang.cobol.
Pls do the needful.
I've tried to follow your example, doing as much of the
needful as you seem to have done.
Thank you.


You're more than welcome -- but only once. Now, please
go away.

--
Eric Sosman
es*****@acm-dot-org.invalid
Jan 3 '06 #3
Eric Sosman <es*****@acm-dot-org.invalid> wrote:
You've misspelled "virtuous." A virtuous function is one
that has no side-effects; these are also called "pure" functions.


I thought a "virtuous" function was one that behaved the way the
programmer intended. :-)

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jan 3 '06 #4

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:dp**********@chessie.cirr.com...
Eric Sosman <es*****@acm-dot-org.invalid> wrote:
You've misspelled "virtuous." A virtuous function is one
that has no side-effects; these are also called "pure" functions.


I thought a "virtuous" function was one that behaved the way the
programmer intended. :-)


No, that's a 'lucky one'!
Jan 3 '06 #5
I may have some "helpful" information with regard to Virtual functions
- however looking at the replies that you have got I am not sure that
this is the correct term:

I use the term "Virtual" function on C to mean a function pointer.

For example if we declare a virtual function (function pointer named
fnc_ptr) like this:
void (*fnc_ptr) (void);

Then later we can make this function pointer point to a real function
(i.e. the address of the function in memory) like this:

fnc_ptr = real_function;

Where real_function could be:

void real_function (void);
{
...
}

Now when you call fnc_ptr() the function real_function will be
executed.

Don't have answers to the rest of the top of my head... sorry.

Best regards,
Alastair

Jan 3 '06 #6

"Alastair" <ad*********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I may have some "helpful" information with regard to Virtual functions
- however looking at the replies that you have got I am not sure that
this is the correct term:

I use the term "Virtual" function on C to mean a function pointer.

For example if we declare a virtual function (function pointer named
fnc_ptr) like this:
void (*fnc_ptr) (void);

Then later we can make this function pointer point to a real function
(i.e. the address of the function in memory) like this:

fnc_ptr = real_function;

Where real_function could be:

void real_function (void);
{
...
}

Now when you call fnc_ptr() the function real_function will be
executed.

Don't have answers to the rest of the top of my head... sorry.


Quite a reasonable definition, but, as the term doesn't appear in the C
stds, not one that will draw many positive comments I fear ['cept.mine
maybe]
Jan 3 '06 #7
Alastair wrote:

Please provide context when replying, people might not have seen the
post you are replying to. See http://cfaj.freeshell.org/google/ for details.
I may have some "helpful" information with regard to Virtual functions
- however looking at the replies that you have got I am not sure that
this is the correct term:

I use the term "Virtual" function on C to mean a function pointer.
I've never heard the term virtual function used to describe a function
pointer in C. The correct terms for a function pointer, as far as I can
tell are "function pointer" and "pointer to a function".

<snip>
Don't have answers to the rest of the top of my head... sorry.


Well, we tend to discourage doing peoples homework for them anyway,
although helping when someone has made the effort is another matter.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Jan 3 '06 #8
Rajnee Kanth wrote
(in article
<11**********************@g44g2000cwa.googlegroups .com>):
Hi,

I want some info on the following items....send me what ever info u
have pls.....
That is not English. The convention here is to post in English,
so any help you can provide in that area would be appreciated.
"u" and "pls" are not words in this language.
1) Segmentaion Voilation
That is when the compiler sees a segment, and cries out "Voila!"
and everyone claps.
2) Shared Objects files
This requires Samba or an equivalent.
3) Virtual Functions
Ask down the hall.
4) How can I call a c function in a c++ program and vice versa?
Didn't your professor cover this in class? (Note: Even if he
did, he probably got it wrong)
5) what is the default size of a stack and heap ?
It depends.
6) Signalling in UNIX
It is very interesting. Reading the documentation can be
illuminating in this area, as in most others.
Pls do the needful.


Which needful are you referring to here? Homeless people?
Assault victims?
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Jan 3 '06 #9
Eric Sosman wrote
(in article <wu******************************@comcast.com>):
6) Signalling in UNIX


UNIX is off-topic here. Try alt.lang.cobol.


First time in a while I have literally burst out laughing
reading this group. :-)
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Jan 3 '06 #10
pemo wrote
(in article <dp**********@news.ox.ac.uk>):

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:dp**********@chessie.cirr.com...
Eric Sosman <es*****@acm-dot-org.invalid> wrote:
You've misspelled "virtuous." A virtuous function is one
that has no side-effects; these are also called "pure" functions.


I thought a "virtuous" function was one that behaved the way the
programmer intended. :-)


No, that's a 'lucky one'!


It depends. What the programmer "intends" can often be
incorrect, especially in the early stages, so following
intention (rather than what is really needed) might be unlucky
in such cases.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Jan 3 '06 #11
> >
I use the term "Virtual" function on C to mean a function pointer.


I've never heard the term virtual function used to describe a function
pointer in C. The correct terms for a function pointer, as far as I can
tell are "function pointer" and "pointer to a function".


Yeah, well its basically a "slang" word in C - I have heard it used.
But I get the impression that Ranjee maybe looking for C++ definitions.
Don't have answers to the rest of the top of my head... sorry.


Well, we tend to discourage doing peoples homework for them anyway,
although helping when someone has made the effort is another matter.


Ok - I can see that this is a fairly unforgiving group! - but I'll go
with the locals rules.
Alastair

Jan 4 '06 #12
Alastair wrote
(in article
<11**********************@f14g2000cwb.googlegroups .com>):
Well, we tend to discourage doing peoples homework for them anyway,
although helping when someone has made the effort is another matter.


Ok - I can see that this is a fairly unforgiving group! - but I'll go
with the locals rules.
Alastair


What is it that you find unforgiving about not doing someone
else's homework for them? You think people that want to get
grades based upon false pretenses are deserving of support and
admiration?

--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Jan 4 '06 #13
Alastair wrote:
I use the term "Virtual" function on C to mean a function pointer. I've never heard the term virtual function used to describe a function
pointer in C. The correct terms for a function pointer, as far as I can
tell are "function pointer" and "pointer to a function".


Yeah, well its basically a "slang" word in C - I have heard it used.


Different people come across different things. Personally I try to avoid
using terms I know have specific meanings in other languages, such as
virtual, unless saying something like, "you could implement something
like virtual functions using function pointers."
But I get the impression that Ranjee maybe looking for C++ definitions.


Indeed.
Don't have answers to the rest of the top of my head... sorry.

Well, we tend to discourage doing peoples homework for them anyway,
although helping when someone has made the effort is another matter.


Ok - I can see that this is a fairly unforgiving group! - but I'll go
with the locals rules.


Not a problem and it was not intended as an attack on you. It's just
that people won't learn by getting others to do their homework, and it
is also not fair on the people who actually do the work themselves if we
do the work for some people.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Jan 4 '06 #14
> >>> I use the term "Virtual" function on C to mean a function pointer.
I've never heard the term virtual function used to describe a function
pointer in C. The correct terms for a function pointer, as far as I can
tell are "function pointer" and "pointer to a function".
Yeah, well its basically a "slang" word in C - I have heard it used.


Different people come across different things. Personally I try to avoid
using terms I know have specific meanings in other languages, such as
virtual, unless saying something like, "you could implement something
like virtual functions using function pointers."


That's probably a good policy.
Don't have answers to the rest of the top of my head... sorry.
Well, we tend to discourage doing peoples homework for them anyway,
although helping when someone has made the effort is another matter.


Ok - I can see that this is a fairly unforgiving group! - but I'll go
with the locals rules.


Not a problem and it was not intended as an attack on you. It's just
that people won't learn by getting others to do their homework, and it
is also not fair on the people who actually do the work themselves if we
do the work for some people.
--


Ok, I'm sorry - I have been having a hard time since I started using
this whole newsgroup thing yesterday... I have just found that people
are a bit hard/sarcastic on you if you ask a "wrong" question! -
anyway... no problems here!

Jan 4 '06 #15
Alastair wrote:

Please leave in the attributions, the lines that tell us who said what,
such as the "Alastair wrote" line above.

<snip>
Ok, I'm sorry - I have been having a hard time since I started using
this whole newsgroup thing yesterday... I have just found that people
are a bit hard/sarcastic on you if you ask a "wrong" question! -
anyway... no problems here!


Yes, it can be hard so you need to develop a thick skin. However, most
of it is not meant personally, and some of it is just cultural
differences (what is considered acceptable or a joke in one country is
considered insulting somewhere else). However, if you can stand it then
there is a lot of expertise here that you (and I) can learn from.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Jan 4 '06 #16
"Alastair" <ad*********@gmail.com> writes:
[snip]
Ok, I'm sorry - I have been having a hard time since I started using
this whole newsgroup thing yesterday... I have just found that people
are a bit hard/sarcastic on you if you ask a "wrong" question! -
anyway... no problems here!


Part of the problem is that we get a *lot* of off-topic questions
here. Many of them are unintentional, e.g., from people who assume
that anything relating to any C implementation is topical here. Too
many, though, are from trolls who know the conventions we've been
following here for many years, but insist on disrupting the newsgroup.

It's been suggested that we should expand the scope of the newsgroup
to include implementation-specific topics as long as they're related
to C. Our neighbors in comp.lang.c++ tried that some years ago, and
it almost destroyed the newsgroup.

The result is sometimes that an innocent newbie will sometimes get the
brunt of years of frustration. (The trolls find this all amusing for
some unfathomable reason.)

Be patient, don't take it personally, and ignore the trolls.
And welcome to the group.

--
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.
Jan 4 '06 #17
On Tue, 03 Jan 2006 08:09:05 -0500, Eric Sosman
<es*****@acm-dot-org.invalid> wrote:
<snip mostly good DYODH>
4) How can I call a c function in a c++ program and vice versa?
Not possible, in either direction. All functions in
a C program are C, so there are no C++ functions to call.


True.
Similarly, a C++ program contains only C++ functions (some
may look a lot like C, but if they reside in a C++ program
the C++ rules prevail).

Not. C++ actually allows all three cases: C++ functions with C++
linkage, C++ functions with C linkage, and true C functions with C
linkage. It's still offtopic in clc, and I'd bet a FAQ in clc++.

- David.Thompson1 at worldnet.att.net
Jan 11 '06 #18

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

Similar topics

4
by: nsr93 | last post by:
I am not sure if this was the proper group to post this, but here is my question: I am a Java consultant. I have new client I am working for to make a web based application similar to an...
1
by: Ddraig | last post by:
Howdy, I've got a little project going and I am trying to figure out a good way to do this. But since I'm still learning I'm probably missing a few obvious steps. Also not sure if I have my...
1
by: Ddraig | last post by:
Howdy, I've got a little project going and I am trying to figure out a good way to do this. But since I'm still learning I'm probably missing a few obvious steps. Also not sure if I have my...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
0
by: yeltsin27 | last post by:
I need some advice on handling dynamically added controls in a GridView. My app takes an uploaded CSV file containing addresses, converts it to a DataTable, databinds the DataTable to a...
1
by: CptDondo | last post by:
I've been struggling with this concept for a while, and I'm getting a bit burned out... I've got a piece of equipment that has data that I need to get. The data is stored in "bytes" for lack...
2
by: Anders B | last post by:
I want to make a program that reads the content of a LUA array save file.. More precicely a save file from a World of Warcraft plugin called CharacterProfiler, which dumps alot of information about...
3
by: mcnewsxp | last post by:
does anyone have anything similar to the following that i can use as a sample to get up to speed? tia - mcnewsxp Requirement - Create a system where user will login. There will be two user...
2
by: nirmalc | last post by:
Question 1: XYZ Company is a Car production company. It has four factories and many distribution outlets spread across the country. The company keeps online records of the sales of its cars. It also...
2
by: redfog | last post by:
I need help writing some code for this procedure: Inventory – Add to Item Listing menu item (15 points). Application users will use this menu as part of the process of entering inventory...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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.