Register    Login    Forum    Search    FAQ

Board index » Programming Heaven » C++ Language




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Programming Tips
 Post Posted: Fri Jul 24, 2009 7:15 am 
Offline

Joined: Wed Jul 22, 2009 12:56 pm
Posts: 69
Here is the simple and most useful tips..,

1) Check for the function prototype for the library function if you don't remember the actual argument type for the library function. e.g., scanf() function.., it expects address of the argument so it should be proveded address of the variable to be filled not the variable itself.

2) Take care that the loop count variable never overflows.., and if so take the overflow into count.
e.g.,
Never expect int variable to count more than 2^( sizeof(int) - 1) (Note : one is substracted for the sign bit.., if it is unsigned we can take full bit length. eg. 2 ^ sizeof(int))


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 1 post ] 

Board index » Programming Heaven » C++ Language


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Your Ad Here
cron