Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

on-line

Haupt Quellenprogramme E-Bücher Downloads Mit uns in Verbindung treten Über uns

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting


Operatoren in CPP


Previous Next





Boolesche Operatoren

und: && Operator

//suppose that San is tired
bool sanIsTired = true;

//but San doesn't have to wake up early
bool sanMustWakeUpEarly = false;

//will San go to sleep now?
bool bedTime = sanIsTired && sanMustWakeUpEarly;

Was tut dieser Klumpen des Codes? Er initialisiert die Variablen, sanIsTired, um auszurichten und sanMustWakeUpEarly zu falschem, die dritte Linie des Codes (die Anmerkungen nicht eingeschlossen), stellen wir fest, daß San schlafen wird wenn und nur wenn „und“ Betrieb zutreffend ist -- das heißt, wenn beide Eingänge zu „und“ Betrieb zutreffend sind. In diesem Fall ist erster Eingang zutreffend und zweiter Eingang ist falsch. Da „und“ beide Eingänge erfordert, zutreffend zu sein, damit ausgegeben, um zutreffend, aber eins von zu sein Eingänge falsch ist, wird Ausgang falsch. So speichert variables bedTime einen falschen Wert.




nicht: !

„nicht“ Operator wird verwendet, indem man Symbol“ setzt! „, vor dem Booleschen Wert.

//suppose that Julie stayed up late
bool julieStayedUpLate = true;

//will Julie be peppy tomorrow?
bool julieIsPeppy = !julieStayedUpLate;

Dieser Code veranschaulicht den „nicht“ Betrieb. Am Ende des Codes, variables julieIsPeppy Willensnehmen ein gegenüberliegender Wert von julieStayedUpLate. Wenn julieStayedUpLate falsch waren, dann würde das variable julianIsPeppy zutreffend sein. In diesem Fall gegenüber von ist zutreffend, also erhält das julieIsPeppy den Wert falsch.




Die arithmetischen Operatoren

Zusätzlich zu den Booleschen Operatoren hat C++ viele arithmetische Operatoren. Sie werden nachstehend aufgeführt:

name symbol sample usage
addition + int sum = 4 + 7
subtraction - float difference = 18.55 - 14.21
multiplication * float product = 5 * 3.5
division / int quotient = 14 / 3
modulo ("mod") % int remainder = 10 % 6

Diese Operatoren schauen vermutlich mit einer Ausnahme Umb. (%) des Operators vertraut. Umb. ist einfach ein Rest, der indem er die zwei Ganzzahlen produziert wird, teilt. Im Beispiel, das oben in der Tabelle, wenn wir 10/6 als das Ganzzahl divison gezeigt wird behandeln, ist Quotient 1 (anstatt seiend 1.666) und Rest ist 4. Folglich erhält ein variabler Rest einen Wert 4.




Gleichheitsoperatoren

Ein Gleichheitsoperator ist an Tests gewöhnt, welche, die Bedingung, wie „kleiner als“ ist, „grösser als“ ist, und „ist gleich“. es ist nützlich zu, zwei Zahlen mit den Ausdrücken wie „x<y“ zu vergleichen.

name symbol sample usage result
is less than < bool result = (4 < 7) true
is greater than > bool result = (3.1 > 3.1) false
is equal to == bool result = (11 == 8) false
is less than or equal to <= bool result = (41.1 <= 42) true
is greater than or equal to >= bool result = (41.1 >= 42) false
is not equal to != bool result = (12 != 12) false

Sobald, den Gleichheitsoperator verwendend, bekannt, ist es einfach, alle andere zu verwenden. Alle sie arbeiten in der gleichen Weise: sie nehmen Ausdrücke auf der jeder Seite von ihnen, und Wille entweder bringt zutreffendes oder falsches zurück.




Die Zuweisungsoperatoren

Im Falle der Zuweisungsoperatoren Rückholist ein wert einfach der Wert, der in einer Variable auf der Link-Handseite gespeichert wird.

int x;
int y;
x = 5;
y = 9;
cout << "The value of 'x' is "<< x << endl;
cout << "The value of 'y' is " << y << endl;
int sum;
sum = x + y;
cout << "The sum of 'x' and 'y' is " << sum << endl;

Dieser Block des Codes zeigt, warum man den Rückholwert des Operators werfen wünschen konnte. Dritte Linie, x betrachten = 5. Wir verwenden einen Zuweisungsoperator hier, um einen Wert 5 in ein variables X. zu legen. Da die Ausdruck x = 5 Rückkehr der Wert und wir nicht ihn verwendet wird, dann kannst du sagen, daß wir einen Rückholwert ignorieren.




Was ist eine Operatorenrangfolge?

Eine Operatorenrangfolge bezieht sich einen auf Auftrag, in dem die Operatoren behoben werden. Ein Operator mit einem hohen Vorausgehen wird vor dem Operator mit dem niedrigeren Vorausgehen verwendet. Ist hier ein Beispiel: Operatoren haben das gleiche Vorausgehen wie die anderen Operatoren in ihrer Gruppe und haben das höhere Vorausgehen als die Operatoren in den untereren Gruppen.

operator name
! boolean not

* multiplication
/ division
% mod

+ addition
- subtraction

< is less than
<= is less than or equal to
> is greater than
>= is greater than or equal to

== is equal to
!= is not equal to

&& boolean and

|| boolean or

= assignment
*= multiply and assign
/= divide and assign
%= mod and assign
+= add and assign
-= subtract and assign




Previous Next

Schlüsselwort- Operatoren in CPP, c++ Operatoren, Java Operatoren, Operatoren in c++, cpp Tutorial, Operatoren im c#, Funktionen cpp, cpp c++, cpp Reihe, bitweise Operatoren, Spitze Operatoren, Reihe Operatoren, cpp Beispiel, cpp Code, cpp Programm, logische Operatoren, cpp Funktion, Algorithmus cpp, arithmetische Operatoren, Operatoren xor, cpp Quelle, Schiebeoperatoren, cpp h


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizes
Oracle Quiz
MySQL Quiz
Operating System Quizes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizes
Testing Quiz
Firewalls Quiz
SAP Module Quizes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizes
Corba Quiz
Networking Quiz
Microsoft Office Quizes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizes
Financial Accounting Quiz
Managerial Accounting Quiz

Privacy Policy
Copyright © 2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved.