construct & function

Status
Not open for further replies.

~Phenom~

The No.1 Stupid
r u talking about programming languages?

if yes, constructs r the various features provided by the language as tools to make a program

while function is one such construct provided by procedural languages such as C.

for more info PM me.
 

abhishekkulkarni

Journeyman
Functions :arrow:

A function in C can perform a particular task, and supports the concept of modular programming design techniques.

The main body of a C program, identified by the keyword main, and enclosed by the left and right braces is a function. It is called by the operating system when the program is loaded, and when terminated, returns to the operating system.

Functions have a basic structure. Their format is:

return_ data_type function name (arguments, arguments)
data _type _declarations of arguments;
{

function body

}

It is worth noting that a return data type is assumed to be of type int unless otherwise specified.

This permits type checking by utilizing function prototypes to inform the compiler of the type and number of parameters a function accepts. When calling a function, this information is used to perform the type and parameter checking.

To call a function, it is only necessary to write its name. The code associated with the function is executed at this point in the program. When the function terminates, execution begins with the statement which follows the function name.

Constructors :arrow:

Objects generally need to initialize variables or assign dynamic memory during their process of creation to become totally operative and to avoid returning unexpected values during their execution.

A class can include a special function: a constructor, which can be declared by naming a member function with the same name as the class. This constructor function will be called automatically when a new instance of the class is created (when declaring a new object or allocating an object of that class) and only then.




 

abhishekkulkarni

Journeyman
Boy - o' Boy two users with the same avtaar. :shock: :shock: :shock: :shock:

Guess this is the first time this has happened in this forum. :lol: :lol: :lol: :lol:

So tell you what give me a good reason & I will surely change it. :wink:

Now don't say that you had it before I had , coz I got this avtaar by Googling hard for it. 8)
 

anomit

In the zone
No, this isnt the first time. Previously another user had it. I requested him and he removed it. This is general courtesy. I dont know if its available by googling, but I got it from a friend at AntiOnline
 
Status
Not open for further replies.
Top Bottom