473,770 Members | 1,939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programming Forum

Hello Guys,
I've developed a forum for programmers and shareware developers to
discuss projects, sales, promotion and more. Please take a look if you
will at http://forum.codecall.net

Thanks,
Jordan

Jun 12 '06 #1
1 2124
On 12 Jun 2006 09:01:09 -0700, jd*******@ionic ware.com wrote in
comp.lang.c++:
Hello Guys,
I've developed a forum for programmers and shareware developers to
discuss projects, sales, promotion and more. Please take a look if you
will at http://xxxxx.xxxxxxxx.xxx
Utter and absolute garbage.

Example from
http://xxxxx.xxxxxxxx.xxx/c-c/201-ca...program-c.html, pasted
with "> " quotes, even though it was not part of the OP's post:

=============== = #include
Obviously somebody does not know how to convert header names to show
up properly in HTML.
float add(float,float );
float sub(float,float );
float product(float,f loat);
float divide(float,fl oat);
void main()
Oops, undefined behavior in C, an ill-formed program in C++.
{
float n1,n2;
char sym,choice;
printf("This Program is a program for calculator\n\n" );
scanf("%f%c%f", &n1,&sym,&n2 );
Doesn't actually prompt for input, nor explain the expected format of
that input. Doesn't take into account the poor behavior of scanf()
with live user input, let alone the potential undefined behavior.
if(sym=='+')
printf("\n%f",a dd(n1,n2));
if(sym=='-')
printf("\n%f",s ub(n1,n2));
if(sym=='*')
printf("\n%f",p roduct(n1,n2));
if(sym=='/')
printf("%f",div ide(n1,n2));
printf("\nDo you wish to continue[y/n]");
scanf("%s",&cho ice);
Uses "%s" conversion specifier to scanf() with the address of a single
character, guaranteed memory overwrite and undefined behavior.
if(choice=='y'| |choice=='Y')
main();
Calls main() recursively to loop?!? Yikes!?!
}
float add(float m1,float m2)
{
return(m1+m2);
}
float sub(float m1,float m2)
{
return(m1-m2);
}
float product(float m1,float m2)
{
return(m1*m2);
}
float divide(float m1,float m2)
{
return(m1/m2);
}


The output may not appear without a terminating '\n', and the leading
'\n' is of questionable utility.

What a waste of web space.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jun 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1641
by: Jst | last post by:
Do you need programming help? If so, pop along to our new forum and post your questions to our qualified developers. http://forum.elistarcreations.com
42
2907
by: Kevin Spencer | last post by:
Is it just me, or am I really observing a trend away from analysis and probem-solving amongst programmers? Let me be more specific: It seems that every day, in greater numbers, people are coming to these programming newsgroups and asking for ready-made solutions to fairly simple programming problems. They either want someone to write code for them, or point them to a ready-made chunk of software that does what they need to do. Now, I'm...
1
321
by: jdelozier | last post by:
I just wanted to let you know that there is a new programming forum available for anyone to join, get answers or get answers. Please take a minute to check out the forum. http://www.codecall.net The forum is for shareware authors with a main focus on programming. Thanks
4
1357
by: Maciek | last post by:
I've got this question regarding programming and design practices. I'm designing Newsletter module for my WebApp and I'm greenhorn in programming. There's a stored procedure which adds a subscriber to a DB. It outputs subscriberID (uniqueidetifier) if it succeeds to add them to the database and return value of "0". When the subscriber already exists but hasn't activated/confirmed their account it returns null for subscriberID and return...
17
79397
Banfa
by: Banfa | last post by:
I felt that this was a good point to start a tutorial on C/C++ programming because clearly we need to have some idea of what we are trying to achieve before we start out. I recently found this definition on the web which I rather like "Programming is planning how to solve a problem. No matter what method is used -- pencil and paper, slide rule, adding machine, or computer -problem solving requires programming. Of course, how one programs...
2
1862
by: technica | last post by:
Hello All, We have started with a new programming discussion group on Gmail. TechnicalTalk is a group dedicated to computer programming discussion, programming tutorials, programming articles and much more. Feel free to join this group and solve your programming queries while discussing them to other programs in the group. We invite you all to visit the group once and join the group!
0
1119
by: technica | last post by:
Visit http://www.TechnicalTalk.net for free resources Technical Discussion Forum General computer programming languages, application programming, programming tutorial and technical articles resources forum. You might be visiting lot of forums for solutions to your programming queries. Some of them might be of ASP 3.0 or of PHP 4.0 or .NET technology, or might be from some XML, Java. There are other forums for database discussion and...
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10005
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8887
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.