CFanatic

Go Back   CFanatic > Programming > C Programming

Join CFanatic Forum Now

passing arguments. topic posted under C Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2012, 09:08 AM
Junior Member
 
Join Date: Oct 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
gurpreet guppi is on a distinguished road
| More
passing arguments.

why we pass parameters(arguments ) in functions?
why we need it?
plz help me.
Reply With Quote
  #2  
Old 02-08-2012, 09:45 AM
shabbir's Avatar
Administrator
 
Join Date: Sep 2006
Posts: 1,164
Thanks: 57
Thanked 63 Times in 44 Posts
shabbir has a spectacular aura aboutshabbir has a spectacular aura about
| More
Re: passing arguments.

If you don't need just don't pass them because passing parameters depends on what your function want to be doing with those data passed.
Reply With Quote
  #3  
Old 02-08-2012, 03:16 PM
hobbyist's Avatar
Member
 
Join Date: Jan 2012
Posts: 55
Thanks: 1
Thanked 20 Times in 16 Posts
hobbyist is on a distinguished road
| More
Re: passing arguments.

to go along with what shabbir stated, unless you're in the habit of using global variables, you need some mechanism to access a variable's value outside of the scope in which it was declared. The way to do that is to pass a variable as a parameter into a function.
Reply With Quote
  #4  
Old 03-30-2012, 02:24 AM
Member
 
Join Date: Feb 2011
Location: CA, USA
Posts: 35
Thanks: 0
Thanked 4 Times in 4 Posts
johnBMitchell is on a distinguished road
| More
Re: passing arguments.

Argument is a value either in form of integer or string which passes when a function called. It is not necessary to pass argument because it depends on a function which you define. It also depends on your program logic.
Reply With Quote
Reply

Thread Tools
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 Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with option parsing arguments!! euler C Programming 2 04-05-2011 12:50 AM
passing arguments to functions using pointers Dixiie OpenGL Programming 0 04-01-2011 05:17 AM
Template arguments onako C++ Programming 0 09-02-2010 09:30 AM
What is the arguments in main when we don't pass anything? Bazman C Programming 1 07-08-2010 07:43 AM
Too Few Arguments Error veronicak5678 C Programming 1 10-02-2007 01:06 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:47 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board