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

What is meant by "method-wars" in programming, Before 1994 there were dissi...

Before 1994 there were dissimilar methodologies like Rumbaugh, Booch, Jacobson, and Meyer etc who followed their own notations to mould the systems. The developers were in a di

Calculate width and height of the grid, Given a cell, we must determine its...

Given a cell, we must determine its neighbouring cells i.e. those with which it shares a wall. The cells with an x are the neighbours of the cell c. Write the function getneighbour

How society is affected thorugh internet, How society is affected thorugh I...

How society is affected thorugh Internet Buying goods and services (for example banking) over the internet has both negative and positive aspects on society. These can be expl

How do you create a permanent cookie, How do you create a permanent cookie?...

How do you create a permanent cookie?  By setting the expiry date of the cookie to a later on time (like 10 years later.)

List the acid properties, a. List the ACID properties. Describe the usefuln...

a. List the ACID properties. Describe the usefulness of each. b. During its implementation, a transaction passes by several states, until it finally commits or aborts. List all

What is assembler, What is Assembler An assembler is a program which ta...

What is Assembler An assembler is a program which takes as input a symbolic language program and produces output as its binary machine language equivalent. The input is known a

Describe about modem language, Q. Describe about Modem Language? Modems...

Q. Describe about Modem Language? Modems understand a set of instructions known as Hayes Command Set or AT Command Set. These commands are used to communicate with Modem. At ti

Phase - thermodynamics, Phase - Thermodynamics: A phase is quantity of...

Phase - Thermodynamics: A phase is quantity of matter that is homogeneous throughout in chemical composition and physical structure. If the matter is all gas, all liquid or

Describe about the database marketing application of olap, Database marketi...

Database marketing tool or application helps a user or marketing professional in determining the right tool or plan for his valuable add campaign. This tool haves data from all sou

DATA DICTIONARY, DATA DICTIONARY ON ONLINE QUIZ SYSTEM

DATA DICTIONARY ON ONLINE QUIZ SYSTEM

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