First of all, in your case, for the purpose of physics, your programming will be mostly mathematical, although some graphics may be involved. Although expensive, high end math programming languages (actually more of a high end "tool") like MatLab are much more suited for the type of mathematical usage you'll find. MathCad is cheaper, but not as powerful. MatLab is a very high level tool, that hides much of how computers are programmed. There may be a student version of MatLab that is relatively cheap.
Matlab can be used interactively. You enter a 3rd order equation, and it will solve it for you, including complex number results, plot it for you as well, and/or show the 3 solutions on a circle on a graph with real and complex axis. To do the equivalent in C or C++ would take hours of programming.
dt19 said:
how different is C from C++?
C is considered a mid-level language; programming in C is closer to programming a computer directly in it's native assembly language than a high level language like the classic high level languages Fortran (still used by NASA) or Cobol (still used for data processing environments like banks on main frames), and very high end tools like MatLab.
C++ is a step up from C, but most of the gain is due to a lot of pre-written code, for example, in the case of Windows, C++ includes default code for dealing with the windows environment, and you program routines that supercede the default routines included in the C++ windows code.
A C structure is an organized group of variables, but one variable type is a pointer to function (it's address). A C++ structure is called a class, and deals with functions more directly rather than as pointer to function variables. In C++, you can "supercede" the default functions in a class. In C to do the equivalent, you'd have to re-assign a new address in a pointer to function. C++ internally renames your functions to include the functions inputs and outputs, so you can have two functions with the apparent same name, like a function called "Add", one that would add integers, the other that would add floating point numbers.
This is probably going beyond what you'll need as "basic understanding" of computers. Personally I wouldn't recommend using C or C++ for mathematical oriented code. C++ is good for windows programming, but even in this case, it's quite common for a lage application to only use C++ for the windows interface, and then use C for the heart (generic) of the application.
If your goal is to learn how to program, then C or C++ is good. If your goal is to use a computer as a tool to help you solve mathematical problems, then MatLab is a much better choice.