[c-prog] Re: Quetions about addresses of array

2008-07-03 Thread John Matthews
--- In c-prog@yahoogroups.com, LiGang [EMAIL PROTECTED] wrote: I have some questions about the address of an array, Please look at the following simple code: === #include stdio.h int main(void) { int inter[3]={1,2,3}; printf(inter is

Re: [c-prog] need a sample programme

2008-07-03 Thread asd dfds
hi i need this simple programe plz send me if you are a good programer [EMAIL PROTECTED] Programe:Write a C++ program that contains a class named Student having following data members: 1. stdId 2. stdName 3. stdAge 4. stdProgram 5. noOfSubjects. The class

Re: [c-prog] need a sample programme

2008-07-03 Thread Paul Herring
On Thu, Jul 3, 2008 at 7:46 AM, asd dfds [EMAIL PROTECTED] wrote: hi i need this simple programe plz send me if you are a good programer [EMAIL PROTECTED] Is there any particular reason you can't be bothered doing your own homework, and then asking us specific questions about the parts on

Re: [c-prog] need a sample programme

2008-07-03 Thread Akter Suriya
Yes Surely, You have to do your homework by your own. On Thu, Jul 3, 2008 at 1:56 PM, Paul Herring [EMAIL PROTECTED] wrote: On Thu, Jul 3, 2008 at 7:46 AM, asd dfds [EMAIL PROTECTED]shan_man130%40yahoo.com wrote: hi i need this simple programe plz send me if you are a good programer

Re: [c-prog] need a sample programme

2008-07-03 Thread Vishnu Kumar
try it by user self. its very easy to implement. if you have doubt to continue further please ask. ~vishnu~ - Original Message From: asd dfds [EMAIL PROTECTED] To: c-prog@yahoogroups.com Sent: Thursday, 3 July, 2008 12:16:22 PM Subject: Re: [c-prog] need a sample programme hi i

[c-prog] Why to use function pointer

2008-07-03 Thread Arindam Biswas
Hi Friends, I need to understand a very simple doubt: Function pointer has some overhead associated with it. Still WHY SHOULD we use function pointer instead of calling directly that function. [ I understand the use e..g: for callback impplementation etc etc. But I need to understand the

Re: [c-prog] Why to use function pointer

2008-07-03 Thread Paul Herring
On Thu, Jul 3, 2008 at 11:16 AM, Arindam Biswas [EMAIL PROTECTED] wrote: Hi Friends, I need to understand a very simple doubt: Function pointer has some overhead associated with it. Still WHY SHOULD we use function pointer instead of calling directly that function. There is no difference

[c-prog] Re: memory access questions

2008-07-03 Thread teletep
Hi all, This is a review of my topic: memory access. Given: long int r[100],m,n,o,v; // array and workvariables char b[4];short int w[1];long int l[1]; // dummy arrays b w l int ba=(int)b,wa= (int)w,la= (int)l; // array base addresses RUN-TIME issues: Each 4-byte cell of array r can contain

[c-prog] Re: memory access questions

2008-07-03 Thread teletep
--- In c-prog@yahoogroups.com, Paul Herring [EMAIL PROTECTED] wrote: On Tue, Jul 1, 2008 at 8:05 PM, teletep [EMAIL PROTECTED] wrote: for 1-byte access: index = memoryaddress - array-base for 2-byte access: index = (memoryaddress - array-base)/2 for 4-byte access: index = (memoryaddress

Re: [c-prog] Re: memory access questions

2008-07-03 Thread Paul Herring
On Thu, Jul 3, 2008 at 12:28 PM, teletep [EMAIL PROTECTED] wrote: --- In c-prog@yahoogroups.com, Paul Herring [EMAIL PROTECTED] wrote: On Tue, Jul 1, 2008 at 8:05 PM, teletep [EMAIL PROTECTED] wrote: for 1-byte access: index = memoryaddress - array-base for 2-byte access: index =

[c-prog] Re: Why to use function pointer

2008-07-03 Thread John Matthews
--- In c-prog@yahoogroups.com, Paul Herring [EMAIL PROTECTED] wrote: On Thu, Jul 3, 2008 at 11:16 AM, Arindam Biswas [EMAIL PROTECTED] wrote: Hi Friends, I need to understand a very simple doubt: Function pointer has some overhead associated with it. Still WHY SHOULD we use function

[c-prog] Re: Why to use function pointer

2008-07-03 Thread John Matthews
--- In c-prog@yahoogroups.com, John Matthews [EMAIL PROTECTED] wrote: --- In c-prog@yahoogroups.com, Paul Herring pauljherring@ wrote: On Thu, Jul 3, 2008 at 11:16 AM, Arindam Biswas biswaari@ wrote: Hi Friends, I need to understand a very simple doubt: Function pointer has some