Free Essay

C Operators

In: Computers and Technology

Submitted By sanjuroshu
Words 462
Pages 2
C- Operators: An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C language is rich in built-in operators and provides following type of operators: Arithmetic Operators: Following table shows all the arithmetic operators supported by C language. Assume variable A holds 10 and variable B holds 20 then: Operator Description Example A + B will give 30 A - B will give -10 A * B will give 200 B / A will give 2 B % A will give 0 A++ will give 11


Adds two operands


Subtracts second operand from the first


Multiply both operands


Divide numerator by de-numerator


Modulus Operator and remainder of after an integer division Increment operator increases integer value by one Decrement operator decreases integer value by one



A-- will give 9

Relational Operators: Following table shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then: Operator Description Checks if the value of two operands is equal or not, if yes then condition becomes true. Checks if the value of two operands is equal or not, if values are not equal then condition becomes true. Example (A == B) is not true.



(A != B) is true.


Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true. Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.

(A > B) is not true.


(A < B) is true.


(A >= B) is not true.

postfix ++ and postfix –– prefix ++ and prefix –– sizeof & typecasts * + / – >> = % * +–~!

Left to right


Right to left

Unary Multiplicative Additive Bitwise shift Relational Equality Bitwise-AND Bitwiseexclusive-OR

Right to left Left to right Left to right Left to right Left to right Left to right Left to right Left to right



Left to right

&& ||

Logical-AND Logical-OR

Left to right Left to right



Right to left

= *= += ^= ,

/= |=

%= = &=

Simple and compound assignment2 Sequential evaluation

Right to left


Left to right

Operators are listed in descending order of precedence. If several operators appear on the same line or in a group, they have equal precedence. All simple and compound-assignment operators have equal precedence. Compilers: A compiler is a program that translates a source program written in some highlevel programming language into machine code for some computer architecture. The generated machine code can be later executed many times against different data each time.…...

Similar Documents

Premium Essay

C&C Grocery Store

...Luis Antonio Olivares Business 418 Organizational Design and Change Case 2: C&C Grocery Stores, Inc. C&C Grocery Stores began losing market share to large company’s like Wal-Mart, Target, and Costco because they were unable to compete on prices with these large companies. They had considered ways to use advance information technology to improve service and customer satisfaction. The Improved service and customer satisfaction would distinguish C&C from large discounters and allow them to compete against them. Another problem C&C had is that the company set a standard layout for all new branches. This hierarchical layout essentially made it easier for the branches to lose Doug Cummins’s informal style and “serve the customer” attitude. The current structure created a couple of problems for C&C Grocery Stores. One of the biggest problems I noticed is that there was no support or cohesion within the managers and district supervisors. Each department manager seemed to be fighting for territory against the other department managers within the store. Almost like gangsters fighting for the same neighborhood. Instead they should have more horizontal communication to help one another. After all, they do work for the same company. The store managers were hungry to learn and improve their management skills, but they had nobody to train them. The district store supervisor, who should have been mentoring the store manager, only inspected for cleanliness.......

Words: 592 - Pages: 3

Premium Essay

Operators Training Model

...OPERATORS TRAINING MODEL To make a model of training and associated knowledge assurance auto sustainable in time, the following steps should be systematically followed: 1. Competence profiles: review and use competence profiles developed by the company for operators, engineers, supervisors and plant managers and maintenance personnel. It is important to note that full powers must include a knowledge component and a component of performance measured through observation of its application. 2. Curriculum maps: Design curriculum maps for technicians, operators, engineers, maintenance personnel and plant managers and supervisors. These curriculum maps will be based on the learning curve of each specialty. 3. Evaluation tools: develop tools required specifically associated with phases of the assessment of knowledge. 4. Evaluation: Conducting initial knowledge assessments and competencies to different groups, to clearly define the starting point current on the levels of knowledge and skills using the evaluation tools developed in step 3 in order to identify the specific areas of improvement of knowledge and the competence profiles developed in step 1. The results of performance evaluations carried out by the company to complement the identification of performance gaps and define interventions required to close them will be used. Skills assessments are conducted by means of: a) Confidential interviews b) Questionnaires and written exercises c)......

Words: 393 - Pages: 2

Premium Essay

Tour Operator

...Within this industry, tour operators play an essential part, as they represent a central connection between tourists and tourism service provider. This report will examine the link between tour operators and other sector of the travel and tourism industry by identifying different products and services provided by tour operators for different target markets. Different factors influencing this sector will be explained as well as and the implication of vertical and horizontal integration within this sector. Finally a brief analysis of the future of tour operators will be given and this is based on research and finding. 2. The role tour operator According to Pro-Poor Tourism (2004) tour operators are businesses that mix two or more travel services such as transport, accommodation, catering, and entertainment, and sell them directly or through travel agencies to final consumers as a single product. A tour operator is thus a crucial link in the distribution chain, representing the central connection between customers and providers of tourism services, and thus has the power to influence both the demand and the supply side. 3. Different Type of Tour Operators a. The Domestic Operators They are companies that develop and sell the holiday within the country in which the tourist reside, they offer a variety of holiday products such as: coach holidays, city break, farm holiday, holiday centres b. The Incoming Tours Operators They are tour operators specializing......

Words: 1513 - Pages: 7

Premium Essay

Comparison of C, C++, and C#

...Jason Latham Comparison of C, C++, and C# IADT Seattle The C family of languages has been a cornerstone in the programming field for years. So exactly what is the C family? It includes the C, C++ and C# (pronounced sharp) languages. Now that we know what they are, what are the differences between the three? Well, that is what will be discussed here. C is a minimalistic programming language because it could be compiled in a straightforward manner by a relatively simple compiler. C offers low-level access to memory via pointers and the ability to access specific hardware addresses. C generates only a few instructions of machine languages for each of its core language elements and does not require extensive run-time support. It can be concluded that C language is suitable for many systems-programming applications that had traditionally been implemented in assembly languages (Gabb, 2012). With its inherent low-level memory access and small run-time support, using C for embedded hardware systems is ideal. Many devices such as robots, machinery, and electronic tools are programmed utilizing its ability to access specific hardware addresses. However, as C is structured oriented programming language and focuses on the procedural programming paradigm, it is relatively hard to control the large-scale program. As C language has high level and machine level mixed programming capacity, it is used in most hardware related applications. It is very suitable for writing programs in......

Words: 1038 - Pages: 5

Premium Essay

C++ Programming

... C++ PROGRAMMING: FROM PROBLEM ANALYSIS TO PROGRAM DESIGN FIFTH EDITION D.S. MALIK Australia  Brazil  Japan  Korea  Mexico  Singapore  Spain  United Kingdom  United States C++ Programming: From Problem Analysis to Program Design, Fifth Edition D.S. Malik Executive Editor: Marie Lee Acquisitions Editor: Amy Jollymore Senior Product Manager: Alyssa Pratt Editorial Assistant: Zina Kresin Content Project Manager: Matthew Hutchinson Art Director: Faith Brosnan Print Buyer: Julio Esperas Cover Designer: Roycroft Design/ Cover Photo: ª Guntmar Fritz/Masterfile Proofreader: Green Pen QA Indexer: Elizabeth Cunningham Compositor: Integra ª 2011 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at Further permissions questions can......

Words: 11776 - Pages: 48

Free Essay

C++ Solution

...overloaded casting operator. This is usually referred to as a conversion function. The syntax for this is as follows: operator typename(){….} The above function shall convert a class type data to typename. A conversion function must follow the following 3 rules: a. It cannot have a return type b. It has to be declared inside a class. c. It cannot have any arguments. (ii)File pointers: we need to have file pointers viz. input pointer and output pointer. File pointers are required in order to navigate through the file while reading or writing. There are certain default actions of the input and the output pointer. When we open a file in read only mode, the input pointer is by default set at the beginning. When we open a file in write only mode, the existing contents are deleted and the file pointer is attached in the beginning. C++ also provides us with the facility to control the file pointer by ourselves. For this, the following functions are supported by stream classes: seekg(), seekp(), tellg(), tellp(). (iii) Function prototyping is used to describe the details of the function. It tells the compiler about the number of arguments, the type of arguments, and the type of the return values. It some what provides the compiler with a template that is used when declaring and defining a function. When a function is invoked, the compiler carries out the matching process in which it matches the declaration of the function with the arguments passed and the return type. In C++,......

Words: 27162 - Pages: 109

Premium Essay

C Tutorial

...C Programming Tutorial C PROGRAMMING TUTORIAL Simply Easy Learning by i COPYRIGHT & DISCLAIMER NOTICE  All the content and graphics on this tutorial are the property of Any content from or this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the site or this tutorial content contains some errors, please contact us at ii T able of Contents C Language Overview .............................................................. 1 Facts about C ............................................................................................... 1 Why to use C ? ............................................................................................. 2 C Programs .................................................................................................. 2 C Environment Setup ............................................................... 3 Text Editor ................................................................................................... 3 The C Compiler ................................................

Words: 14106 - Pages: 57

Free Essay

Boolean Operator

...logical operator) is a symbol or word used to connect two or more sentences (of either a formal or a natural language) in a grammatically valid way, such that the sense of the compound sentence produced depends only on the original sentences. The most common logical connectives are binary connectives (also called dyadic connectives) which join two sentences which can be thought of as the function's operands. Also commonly, negation is considered to be a unary connective. Logical connectives along with quantifiers are the two main types of logical constants used in formal systems such as propositional logic and predicate logic. Semantics of a logical connective is often, but not always, presented as a truth function. A logical connective is similar to but not equivalent to a conditional operator. [1] Contents [hide] 1 In language 1.1 Natural language 1.2 Formal languages 2 Common logical connectives 2.1 List of common logical connectives 2.2 History of notations 2.3 Redundancy 3 Properties 4 Order of precedence 5 Computer science 6 See also 7 Notes 8 References 9 Further reading 10 External links In language[edit] Natural language[edit] In the grammar of natural languages two sentences may be joined by a grammatical conjunction to form a grammatically compound sentence. Some but not all such grammatical conjunctions are truth functions. For example, consider the following sentences: A: Jack went up the hill. B: Jill went up the hill. C:......

Words: 2282 - Pages: 10

Free Essay

C Programming

...C PROGRAMMING Section 1. Topics: Functions Statements Input Output Variables Introduction The C programming language has been the most popular high level language used for engineering applications for the last 20 years. It shares many common structures with other procedural languages, such as Pascal, and can be used for general purpose programming of a PC. However, it is also particularly good for development of embedded application programs such as those found in phones, video recorders and so forth. The term procedural language refers to the fact that the language uses procedures to do particular tasks such as printing on the screen. In C these procedures are known as functions and are described below. What is so good about a language like C? The basic reason such languages were developed was to make it easier for humans to program computers. The alternative is the language of the computer, i.e., binary codes. Clearly such ‘low-level’ languages are not very appealing for humans, although sometimes necessary for detailed engineering work. (In fact C is often ‘mixed’ with such languages for engineering applications.) C uses words and symbols that are part of, or similar to, normal language. This makes it easier for programmers to develop code. The C code is converted to the machine code by a special program called a compiler. See note 1. But perhaps the most useful thing about such a language is that it provides the developer with a library of......

Words: 3795 - Pages: 16

Free Essay

Report in C++

...framework for many of the features of object-oriented languages today. C with classes which as the name implies was meant to be a superset of the c language, His language included classes, basic inheritance, inlining, default functions arguments and strong type checking in addition to all the features of the c language. Cfront was the original compiler for c++ from around 1983, which coverted c++ to c. The preprocessor did not understand all of the language and much of the code was written via translations. Cfront had a complete parser, built symbol tables, and built tree for each class, and functions Cfront was based on CPre (C with classes compiler, which was started in 1979) The ++ operator in the C language is an operator for incrementing a variable, which gives some insight into how Stroustrup regarded the language The c++ programming language was the first book to describe the c++ programming language, written by the language’s creator Bjarne stroustrup, and first published in October 1985, in the absence of an official standard, the book served for several years as the de facto documentation for the evolving c++ language until the release of the ISO/IEC 14882:1998 Turbo C++ added a plethora of additional libraries which would have a considerable impact on C++'s development. Although Turbo C++'s last stable release was in 2006, the compiler is still widely used. C++ ISO/IEC 14882;1998 =  The Annotated C++ Reference Manual was said to be a large influence in the......

Words: 593 - Pages: 3

Free Essay

Message to Operator

...Hiho I am currently having some technical issues with my mobile operator. I cannot make calls with the phone, it says that I should contact my provider. I have been trying to get in contact with you for the last couple of days. I would sincerely appreciate if you could take your time to solve these issues for me. However, there are some positive things that I would like to share with you. First of all, I have been a customer at your company for several years and I have never encountered any problems which I am very grateful for. Secondly, I am very surprised to learn that you get more discounts of your product depending on how long you have been a customer. Still, there are some important points that I would like you to look over. I think the support could be improved since I find it difficult to get in contact with you, through email. I believe it would improve your service in the future. One solution would be to hire more people who can be responsible for the support. I definitely recommend it. But you have to consider if it is worth the time and effort, perhaps you may think it’s more important to prioritize something else. I hope you will give this matter your urgent attention and do what you think is necessary to ensure this mistake is not repeated. Once again, I am glad I use your service and I will continue to work with you, as long as there are no further issues. I look forward to hearing from you soon...

Words: 268 - Pages: 2

Free Essay

C Book

...Let Us C Fifth Edition Yashavant P. Kanetkar Dedicated to baba Who couldn’t be here to see this day... About the Author Destiny drew Yashavant Kanetkar towards computers when the IT industry was just making a beginning in India. Having completed his education from VJTI Mumbai and IIT Kanpur in Mechanical Engineering he started his training company in Nagpur. Yashavant has a passion for writing and is an author of several books in C, C++, VC++, C#, .NET, DirectX and COM programming. He is a much sought after speaker on various technology subjects and is a regular columnist for Express Computers and Developer 2.0. His current affiliations include being a Director of KICIT, a training company and DCube Software Technologies, a software development company. In recognition to his contribution Microsoft awarded him the prestigious “Best .NET Technical Contributor” award recently. He can be reached at Acknowledgments It has been a journey of almost a decade from the stage the book idea of “Let Us C” was conceived up to the release of this Fifth Edition. During this journey I have met so many students, developers, professors, publishers and authors who expressed their opinions about Let Us C. They have been the main motivators in my effort to continuously improve this book. In particular I am indebted to Manish Jain who had a faith in this book idea, believed in my writing ability, whispered the words of encouragement and made helpful......

Words: 46741 - Pages: 187

Premium Essay

Tour Operators

...offered and why they might be of interest to the potential customer. In this way, the development organization is targeting markets that it knows will be interested in the products it offers. REFERENCE Becker, I. (2015) ‘Leadership is about growth: 3 ways to adapt, evolve, and thrive’, Digitalist Megazine (May), . Drucker, P. F. (1999) Change leaders. Available at: (Accessed: 13 December 2015). Drucker, P. F. (1999) Change leaders. Available at: (Accessed: 13 December 2015). E-commerce for development: Challenges and opportunities (no date) Available at: (Accessed: 15 December 2015). Francis-Nurse, C. (2015) Managing change: The leadership challenge. Available at: (Accessed: 13 December 2015). Morley, M. (2013) ‘Effects of technology on business communications’, Small Business Chron, . Morris, J. and Upchurch, B. (no date) The practices of successful managers. Available at: (Accessed: 13 December 2015). The effects of bad management vs employee turnover (2010) Available at: (Accessed: 15 December 2015)....

Words: 1372 - Pages: 6

Premium Essay

Learning C#

... Learning C# 3.0 Other resources from O’Reilly Related titles C# 3.0 Cookbook™ C# 3.0 Design Patterns C# 3.0 in a Nutshell Programming ASP.NET 3.5 Programming C# 3.0 Programming .NET 3.5 Programming WCF Services Programming WPF is more than a complete catalog of O’Reilly books. You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples. is the essential portal for developers interested in open and emerging technologies, including new platforms, programming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in documenting the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit for our upcoming events. Safari Bookshelf ( is the premier online reference library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or simply flip to the page you need. Try it today for free. Learning C# 3.0 Jesse Liberty and Brian MacDonald Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Learning C# 3.0 by Jesse Liberty and Brian MacDonald Copyright © 2009 Jesse Liberty...

Words: 62585 - Pages: 251

Free Essay

C Primer

...Third Edition March 26, 1998 ISBN: 0201824701, 1264 pages C++ Primer Third Edition Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and AddisonWesley was aware of a trademark claim, the designations have been printed in initial capital letters or all capital letters. The authors and publisher have taken care in preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The programs and applications presented in this book have been included for their instructional value. They have been tested with care, but are not guaranteed for any particular purpose. The authors and publisher do not offer any warranties or representations, nor do they accept any liabilities with respect to the programs or applications. The publisher offers discounts on this book when ordered in quantity for special sales. For more information please contact: Corporate, Government, and Special Sales Addison Wesley Longman, Inc. One Jacob Way R Copyright Information Copyright © 1998 by AT&T, Objectwrite, Inc., and José Lajoie e Library of Congress Cataloging-in-Publication Data Lippman, Stanley B. C++ Primer / Stanley B. Lippman, José Lajoie. — 3rd ed. e p.......

Words: 275162 - Pages: 1101

Selena Gomez - Come & Get It (Live At The Radio Disney Music Awards). | Baixar XAPK | El vórtice de la mazorca de maíz