Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

What's the difference between > and >>? in programing

OpenStudy (anonymous):

`>` is a comparison and `>>` is a bit operation (e.g. `a >> 1` means that all bits in a are shifted one bit to the right: the result is a division by two)

OpenStudy (anonymous):

also you can use the << or >> to show to where is going the flow of what you are using, like in c++ you can prin cout << "x", it means that x will be shown in the screen.... also to assigned a value to a variable unspecified like int x; int y; cout << "type a value" << endl; cin >> x; // x will have the value typed in the expression of cout. cout << "type second value" << endl; cin >> y; // y will have the value typed in the expression of cout. if (x >y){ cout << "value" << x << "is higher than" << y << endl; return 0;

OpenStudy (rsmith6559):

In shell programming, < and > redirect input and output respectively. > creates a new file, >> appends to an existing file.

OpenStudy (anonymous):

Note: chinopocora's example is a standard libraries usage of operator overloading. Operator overloading can be used in any c++ class to define what an operator should do. The shift operator may not always make sense, so if you're using an external library, read the documentation first to see if it does what you're expecting.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!