How can a function return a pointer to its calling routine, Computer Engineering

Assignment Help:

How can a function return a pointer to its calling routine?

The general form of a function is:

type_specifier function_name(parameter list)

{

body of function;

}

where type_specifier specifies the type of value that the function's return statement returns and the parameter list is a comma-separated list of variable names and types which receive the values of the arguments passed by the call to the function. The purpose of most functions is to either perform a computation and return a value, manipulate information and return a success-or-failure (true or false) value, or perform a strictly procedural routine which produces no value (eg, the exit() function). Functions may be declared to return any valid C data type. If the  return  type  is  not  specified,  it  automatically  defaults  to  type  int.  return  causes  an immediate exit from a function. It may also be used to return a value. All functions, except those of type void, return a value.

Functions that return pointers are handled just like any other type of function, e.g.:

char * match(char c, char *s)

{

while(c != *s && *s)

s++;

return(s);


Related Discussions:- How can a function return a pointer to its calling routine

There no polymorphic-type response, Why is there no polymorphic-type respon...

Why is there no polymorphic-type response from a create() or find() method? Ans) The EJB Specification forbids this behavior, and the weblogic.ejbc compiler checks for this beha

What is public, * Public, protected and private are 3 access specifier in C...

* Public, protected and private are 3 access specifier in C++. * Public data members and member functions are accessible outside the class. * Protected data members and memb

Describe about physical systems, Q. Describe about Physical Systems? Ph...

Q. Describe about Physical Systems? Physical Systems are tangible entities which may be dynamic or static.   Computer Systems, Buildings,Vehicles etc. are illustrations of p

Hypertext vs hypermedia, Hypertext vs Hypermedia     Hypertext is basic...

Hypertext vs Hypermedia     Hypertext is basically the similar as regular text - it can be stored, read, searched, or edited - with a significant exception: hypertext having co

Explain the fundamentals of c programming, Explain the Fundamentals of C Pr...

Explain the Fundamentals of C Programming? The C is a general purpose structured programming language. The C was developed and first implemented by the Dennis Ritchie at Bell L

Group cells in a layout table, Now you will put navigation button cells you...

Now you will put navigation button cells you just created into a single table. Grouping cells into a table enables you to control cell spacing and to easily move the cells as a gro

Illustrate the list of key differences to word processors, Illustrate the l...

Illustrate the list of key differences to word processors The following is a list of key differences to word processors: -  Most word processors force users to work on a doc

Design a BCD to excess 3 code converter using NAND gates, Design a BCD to e...

Design a BCD to excess 3 code converter using minimum number of NAND gates. Hint: use k map techniques. Ans. Firstly we make the truth table: BCD no

Determine 1''s complement representation of decimal number, 1's complement ...

1's complement representation of decimal number of -17 by using 8 bit representation is ? Ans. (17) 10 = (10001) 2 In 8 bit = 00010001 1's Complement = 11101110

Determine the basic machine language instructions, Determine the basic Mach...

Determine the basic Machine language instructions Machine language instructions and data are in terms of 0s and 1s and are stored in the memory. It isn't possible to distinguis

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd