- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are C operators and Punctuators?
An operator is used to describe an operation applied to one or several objects. It is mainly meaningful in expressions, but also in declarations. It is generally a short sequence using non-alphanumeric characters.
A punctuator is used to separate or terminate a list of elements.
C operators and punctuators are as follows −
... && -= >= ~ + ; ] <<= &= -> >> % , < ^ >>= *= /= ^= & - = { != ++ << |= ( . > | %= += <= || ) / ? } ## -- == ! * : [ #
Note that some sequences are used as operators and as punctuators, such as *, =, :, # and ,.
Several punctuators have to be used by pairs, such as ( ), [ ], { }.
When parsing the input text, the compiler tries to build the longest sequence as possible for a token, so when parsing a+++++b, the compiler will recognize the following −
a ++ ++ + b which is not a valid construct
The compiler will not consider the following −
a ++ + ++ b which may be valid
Advertisements