Sie sind auf Seite 1von 2

C (if you are talking about straight c) is a medium level language (some say

high, but BASIC is high-level) that is a bit more cryptic than BASIC.

C++ which is C with Classes (classes are the foundation of OOP (object
oriented programming) is slightly more difficult to learn than C, but a good
foundation in C will help with the transition to c++

the main difference between C and BASIC is the Syntaz (or words that make
up the programming language) for instance here is a loop (called a for loop,
or for/next loop) in BASIC:

FOR X = 0 TO 9
PRINT X
NEXT X

Here is that same loop in C

for(int X=0;X<10;X++)
printf("%d",X);

as you can see they look quite different. that is because BASIC was created
to mimic english moreso then most programming languages (in fact the only
two programming languages more like english than BASIC are Fortran and
COBOL)

the other major difference is in the structure and forgiveness of the two
languages. Meaning that BASIC is an unstructured procedural language and
C is more structured. In addition, BASIC is case insensitive whereas C is case
sensitive.

here are examples:

BASIC:
Dim X
X=1
x=x+1
print X

OUTPUT:
2

C:
int X;
X = 1;
X++;
printf("%d",x); <-- throws an error (x is undefined)
Finally, BASIC is an interpreted language and C is not. This means that you
can write a program in BASIC and run it, modify it, re-run it all at the same
time. C must be compiled to an executable and then run. If you make
changes to your C code, you will need to recompile before you can test those
changes.

There are more differences, but those are probably the most significant.

Since I graduated from High School almost 2 decades ago, I don't think I
have any idea what they might make you program in the current classes. In
my day we would do the "Hello World", "Count to 10", "Guess A Number
Between 1 and 10", and other mathimatical/logic type apps.

Das könnte Ihnen auch gefallen