Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i have doubt in VARIABLE NAME in C language????

Status
Not open for further replies.

soni.pankajkumar

Newbie level 5
Joined
Jan 10, 2006
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore
Activity points
1,359
doubt in c language

in 'C' language we consider '_' as a Character,so can we have '_' as a first letter of any variable name,if please give me the reason???:cry:[/b]
 

Yes, an identifier can start with '_'.
Does the question arise because you found that a character '_' was appended at the beginning of a variable name by the compiler?
Regards

Z
 

Hi,
Yes, we can have "_" as a first character for a variable name, but usually it is advised not to do so because all the system variables have their names begining with "_" as the first character.
 

is not a problem to use it .but once they are exported to assemble modules you will end uop with variables names with two underscores !
 

soni.pankajkumar said:
in 'C' language we consider '_' as a Character,so can we have '_' as a first letter of any variable name,if please give me the reason???:cry:

Can you >>> Yes you can,
Reason >>> you can guess it if you opened any header file or library file in a text document where you will find too many identifiers starts with the same char '_'
I hope that helped :)

Ahmad,
 

yup u can use that as the first variable name but that is not advisable
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top