What kind of problems is c best at solving?

M

Malcolm

nib said:
What kind of problems is c best at solving?
Any computer program is best if it solves a well-defined problem, and is
short enough for a single person to understand it at once.

C should be your langauge of choice if it is important that the program be
understood by a large number of people (simply because C is so widely
understood). It is also the language to choose if execution speed is
extremely important, because C compilers are very efficient.

If execution speed is paramount you should use assembly language, if it is
important that the language be easy to implement (ie build an
interpreter/compiler for) you should use BASIC, if the project is very
complex then arguably you should use C++, if the problem is non-numerical in
nature SNOBOL, for pattern matching, or COBOL, for business programming, are
good choices.

C is a very general-purpose language that should be the default if nothing
else is indicated.
 
P

Peter Pichler

[Sorry I'm using Malcolm's post as I can't see the OP's post yet]

Anything that can be described by an algorithm. Preferably a procedural
algorithm, though it's not uncommon to use C in typically OO or other
non-procedural context.

Peter
 
R

Richard Heathfield

osmium said:
Here is a list of things where C++ has been alleged to be used with some
degree of success.

Methinks you forgot which newsgroup you're in.

<snip!>
 
O

osmium

Peter said:
Anything that can be described by an algorithm. Preferably a procedural
algorithm, though it's not uncommon to use C in typically OO or other
non-procedural context.

If C is best at solving anything that can be described by an algorithm then
it is the best language there is. A highly dubious assertion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top