Beginner C/C++

Moderators: None (Apply to moderate this forum)
Number of threads: 5430
Number of posts: 16951

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Data Structure Help Posted by anshya on 28 Jun 2008 at 12:17 PM
As a part of my project on data structures,I have prepared
a small test survey on data structure across three languages - C/C++/java.This survey will help me in collecting and comparing the level of understanding and complexity of the three languages among different programmers.
All interested fellow programmers please visit the link given below. It will also quick brush up your DS skills.
Help will be greatly appreciated. [smile.gif]
here is the link - ds-test.weebly.com
Report
Re: Data Structure Help Posted by Lundin on 29 Jun 2008 at 1:19 AM
Took a quick look at it.

There is an (unintended?) issue with the first program: you are using int rather than unsigned int. ISO C allows int to either be signed or unsigned, it is implementation-specific. On a compiler that sets int as unsigned by default, your code will crash upon accessing array index 0xFFFF (16-bit machine) or 0xFFFFFFFF (32-bit machine).

Also, void main() will not work on any standard compiler for hosted environments (Windows, Linux etc).



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.