can anyone help
when should i make a function inline and what are the advantages of inline functions
usefulness of pointers over arrays, file pointers and conversion function
thanks
|
TechCake
|
|
| 19Mar2008,13:50 | #2 |
|
First search on net or read some books. You can easily get this sort of ?
|
|
Newbie Member
|
|
| 19Mar2008,21:28 | #3 |
|
Quote:
Originally Posted by asadullah.ansari
|
|
TechCake
|
|
| 20Mar2008,10:24 | #4 |
|
Quote:
Originally Posted by themindroom Advantages Of Inline Function: : First you have to understand normal function call senario. If any function call then a stack frame is created in which some context is saving like function arguments, return address etc. Actually this is overhead in a normal function call. In case of Inline function called, No stack frame is created. So this overhead we can save, but only for small function. NOTE: One thing more when we are wrinting inline function, menas we are requesting to compiler, Now comppiler see If Instructions under function is less then complier treats as a inline else normal function call. Advantages of pointer over Array: : Pointer can be incremented or decremented but in case of array, you cannt change base address of any array so you cant do such incremented or decremented operation on array to move one place to other. ( You can get anywhere more advantages) FILE POINTERS: : File pointer has very important role to read and write into secondary device(I/O) i.e. into files. By file pointer. By file pointer you can reach anywhere in the file any place means easily search, edit, delete etc. You can do this by indirection but multiple file reading writing you can'nt do . SO accessing multiple files, file pointer can handle. CONVERSION FUNCTION: : This concept is mainly come into c++ Code: cpp
If any doubts just straightforward ask? Last edited by asadullah.ansari; 20Mar2008 at 10:31.. Reason: Text formatting |
|
TechCake
|
|
| 20Mar2008,10:32 | #5 |
|
Realted to conversion function you can see detail on this link
http://publib.boulder.ibm.com/infoce...c15cplr385.htm |
|
Newbie Member
|
|
| 22Mar2008,21:50 | #6 |
|
hi, many thanks ansari JI . really appreciate your help. i am appearing for my board exams and these answers really help. thanks again
Quote:
Originally Posted by asadullah.ansari |
|
Newbie Member
|
|
| 23Mar2008,20:24 | #7 |
|
Hi guys. . I'm a newbie /maybe dummy
/teacher gave me homework.. but I can"n solve it.. Can sum1 help me?? Write a C program that will input a 9-digit Credit Card Number, and will check whether iit is valid or not (i.e. to examine if the last 2 digits of the Credit Card Number can be generated from the first 7-digit number) |
|
Contributor
|
|
| 25Mar2008,15:21 | #8 |
|
Quote:
Originally Posted by macchiato |
|
Newbie Member
|
|
| 26Mar2008,17:54 | #9 |
|
Lyk what?
Let's assume I'll do it.. Could I get any help?? İf urs answer is yea.. OK.. I'll do it.. Thanks... |

/