is C useful ?

Z

zc

I have just decided to learn C,
But is it useful ? or should I learn C++ ?
Can I get a job with C ?
what can I do with C ?
zc
 
M

Mark A. Odell

I have just decided to learn C,
But is it useful ?
Very.

or should I learn C++ ?

Can't hurt.
Can I get a job with C ?
Yes.

what can I do with C ?

Anything you can imagine. Some things are harder in C than in C++ but it's
yet to be a real problem for me. You will find more C compilers available
for 8-bit microcontrollers than C++ compilers.
 
M

Mark A. Odell

(e-mail address removed) (Eric) wrote in

Really? I can travel back and forth in time? :)

Okay, well anything you can image that could be programmed into a CPU with
C run-time support and a compiler. I should have been more specific. If
you do go back in time, could you get rid of plain char?
 
L

Les Cargill

Eric said:
Really? I can travel back and forth in time? :)

--
== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like violence, are the last refuge of the incompetent... ===

Shhhh!
 
E

Eric Sosman

Eric said:
Really? I can travel back and forth in time? :)

Certainly. For example:

#include <stdio.h>
int main(void) {
int i = 0 //*comment*/
+ 10;
printf ("The year is %d\n", 1989 + i);
return 0;
}
 
S

Sidney Cadot

Mark said:
(e-mail address removed) (Eric) wrote in





Okay, well anything you can image that could be programmed into a CPU with
C run-time support and a compiler.

Determining whether a given file exists seems to be a bit of a stretch
though.

Best regards,

Sidney
 
K

Kenneth Brody

Eric said:
Really? I can travel back and forth in time? :)

Yes, you can use C to interface to the mind warper generation 4
Dimensional Warp Generator # 52 4350a series wrist watch with z60
or better memory adapter.

The specifics is left as an exercise to the reader.

--

+---------+----------------------------------+-----------------------------+
| Kenneth | kenbrody at spamcop.net | "The opinions expressed |
| J. | http://www.hvcomputer.com | herein are not necessarily |
| Brody | http://www.fptech.com | those of fP Technologies." |
+---------+----------------------------------+-----------------------------+
 
K

Kenneth Brody

Aggro said:
See <time.h>

You might need to use some extensions of C.

Just open("/dev/time",O_RDONLY), and then lseek() as necessary.

--

+---------+----------------------------------+-----------------------------+
| Kenneth | kenbrody at spamcop.net | "The opinions expressed |
| J. | http://www.hvcomputer.com | herein are not necessarily |
| Brody | http://www.fptech.com | those of fP Technologies." |
+---------+----------------------------------+-----------------------------+
 
F

Fao, Sean

Eric said:
Really? I can travel back and forth in time? :)

Programs are only as smart is their designer(s) makes them. If you can
program a time machine in C, then the answer to this question is, "yes"
;-).

Sean
 
I

I.M.A Troll

E. Robert Tisdale said:

But only if you don't cast malloc(). Sorry E. I know we trolls
should stick together. What does E. stand for anyway? It must be
awful!
 
M

Morris Dovey

Eric said:
Really? I can travel back and forth in time? :)

This is really three questions. Forth is off-topic in comp.lang.c
so you'll have to ask about that in another newsgroup.

"Anything you can imagine" is implementation dependent, as Mark
should have pointed out. This is also best addressed in a
different forum - perhaps alt.bin.[whatever]

Reality and time within the same context would seem to have been
"icky" to the authors of the ISO standard. They seem to have been
obliged to admit that time exists; but could not bring themselves
to actually give it a size, shape, or even a domain. It's not
even guaranteed to be monotonic.

The upshot is that you /may/ be able to go back in time; but
if/when you get there, you can't verify success by direct
examination of that /when/.

Even the common extensions do not provide much satisfaction. The
entire subject seems to have been stricken with geek poisoning.
In POSIX land, for example, you can go back to the beginning of
1970, but any attempt to go earlier will result in falling off
the edge of the continuum. An attempt to go back to, say, the
fall of Carthage will be met with jeers and ridicule by even the
friendliest of mktime() implementations.

To remain strictly conforming, it's safest to stay when you are.
 
K

Kenneth Brody

Morris Dovey wrote:
[...]
Reality and time within the same context would seem to have been
"icky" to the authors of the ISO standard. They seem to have been
obliged to admit that time exists; but could not bring themselves
to actually give it a size, shape, or even a domain. It's not
even guaranteed to be monotonic.
[...]

"Monotonous", on the other hand...

--

+---------+----------------------------------+-----------------------------+
| Kenneth | kenbrody at spamcop.net | "The opinions expressed |
| J. | http://www.hvcomputer.com | herein are not necessarily |
| Brody | http://www.fptech.com | those of fP Technologies." |
+---------+----------------------------------+-----------------------------+
 
D

David Shaw

Kenneth Brody said:
Just open("/dev/time",O_RDONLY), and then lseek() as necessary.

It's always important to take care and open /dev/time O_RDONLY. It
helps prevent the sadly common "kill your own grandparents" bug.

David
 
E

Eric

David Shaw said:
It's always important to take care and open /dev/time O_RDONLY. It
helps prevent the sadly common "kill your own grandparents" bug.

Yes, indeed.

Someone should really speak to the system administrator about this.
 
C

CBFalconer

David said:
It's always important to take care and open /dev/time O_RDONLY. It
helps prevent the sadly common "kill your own grandparents" bug.

Unfortunately open, lseek, and grandparents are not mentioned in
the standard, and are thus OT here. Time travel is intrinsically
not portable. Please move to a future newsgroup which covers your
system. :)
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top