Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-07-2005, 03:10 PM   #1 (permalink)
Broken In
 
Join Date: Feb 2004
Posts: 125
Default construct & function


difference b/w construct and function
__________________
Think about it!
Trinity is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 08-07-2005, 07:10 AM   #2 (permalink)
The No.1 Stupid
 
~Phenom~'s Avatar
 
Join Date: May 2005
Location: CYBERYARD
Posts: 1,708
Default

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.
~Phenom~ is offline  
Old 08-07-2005, 08:39 AM   #3 (permalink)
Broken In
 
abhishekkulkarni's Avatar
 
Join Date: Aug 2004
Location: Amche Pune
Posts: 182
Default

Functions

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

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.




__________________
May the source be with you ..
abhishekkulkarni is offline  
Old 08-07-2005, 11:31 AM   #4 (permalink)
In The Zone
 
anomit's Avatar
 
Join Date: Mar 2005
Location: Kharagpur
Posts: 252
Default

@abhishekkulkarni: Man, change ur avatar. How many times should I tell u??
__________________
Don\'t SYN me, I'll SYN you. :p
anomit is offline  
Old 08-07-2005, 08:52 PM   #5 (permalink)
Broken In
 
abhishekkulkarni's Avatar
 
Join Date: Aug 2004
Location: Amche Pune
Posts: 182
Default

Boy - o' Boy two users with the same avtaar.

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

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

Now don't say that you had it before I had , coz I got this avtaar by Googling hard for it. 8)
__________________
May the source be with you ..
abhishekkulkarni is offline  
Old 09-07-2005, 10:59 AM   #6 (permalink)
In The Zone
 
anomit's Avatar
 
Join Date: Mar 2005
Location: Kharagpur
Posts: 252
Default

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
__________________
Don\'t SYN me, I'll SYN you. :p
anomit is offline  
Old 09-07-2005, 04:05 PM   #7 (permalink)
Human Spambot
 
expertno.1's Avatar
 
Join Date: May 2005
Location: Expert Planet
Posts: 2,480
Default

u can get good avatars on www.hotavatars.com

www.avatarity.com
__________________
Off From Digit Forum for some months.....busy
expertno.1 is offline  
Old 09-07-2005, 11:06 PM   #8 (permalink)
Broken In
 
abhishekkulkarni's Avatar
 
Join Date: Aug 2004
Location: Amche Pune
Posts: 182
Default

@anomit

Avtaar changed.
__________________
May the source be with you ..
abhishekkulkarni is offline  
Old 10-07-2005, 01:25 PM   #9 (permalink)
In The Zone
 
anomit's Avatar
 
Join Date: Mar 2005
Location: Kharagpur
Posts: 252
Default

Excellent man!!!Sorry we went little bit off-topic but he has already answered it.
__________________
Don\'t SYN me, I'll SYN you. :p
anomit is offline  
Old 10-07-2005, 02:26 PM   #10 (permalink)
A Year Closer To Heaven
 
ctrl_alt_del's Avatar
 
Join Date: Feb 2005
Location: Bangalore
Posts: 1,370
Default

The questions have been answered and the thread is going wildly off-topic, hence locked.
__________________
The ANGRY Pixel proudly announces the launch of India's first ever launch center for a game, The ANGRY Pixel - Milestone Interactive Street Fighter 4 Launch Center
ctrl_alt_del is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2