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


Ausbreitende Aussage in C

Previous Next




Ausbreiten

Die C-Sprache Programme folgt einer aufeinanderfolgenden Form der Durchführung von Aussagen. Viele Male wird es angefordert, um den Fluß der Befehlsfolge zu ändern. C-Sprache liefert Aussagen, die den Fluß einer Befehlsfolge ändern können. Diese Aussagen werden als Steueranweisungen benannt. Um von einem Teil des Programms zu anderen zu springen, helfen diese Aussagen. Die Steuerübertragung kann unbedingt oder bedingt sein. Ausbreitendes Statemnt sind von folgenden Kategorien:

  1. If Statement
  2. The If else Statement
  3. Compound Relational tests
  4. Nested if Statement
  5. Switch Statement




Wenn Aussage

Wenn Aussage das einfachste ist, von der Steueranweisung bilden. Sie wird sehr häufig verwendet, wenn man den Fluß des Ablaufs des Programms und der Beschlußfassung erlaubt.

, wenn Struktur die folgende Syntax hat

if(condition)

statement;

Der Befehl sagt, daß, ist zutreffend wenn die Bedingung dann, die folgende Aussage durchführen, oder, wenn die Bedingung gefälscht ist, überspringt der Computer die Aussage und bewegt an auf die folgende Anweisung im Programm




Das folgende Programm errechnen den Absolutwert einer Ganzzahl mit, wenn Aussage:

Calculate the absolute value of an integer */
# include < stdio.h > //Include the stdio.h file
void main ( ) // start of the program

{
int numbers; // Declare the variables
printf ("Type a number:"); // message to the user
scanf ("%d", & number); // read the number from standard input
if (number < 0) // check whether the number is a negative
number
number = - number; // If it is negative then convert it into
positive.
Printf ("The absolute value is % d \n", number); // print the value
}



Wenn sonst Aussage

, wenn sonst wirklich eine Verlängerung des allgemeinen Formats von wenn Aussage gerecht ist. Wenn das Resultat der Bedingung zutreffend ist, dann ist Programmaussage 1 durchgeführte sonst Programmaussage 2 wird durchgeführt. Die Syntax von, wenn sonst Aussage ist, wie folgt:

If (condition)

Program statement 1;
Else
Program statement 2;



Die folgende Programmentdeckung, ob eine Zahl negatives oder positives Verwenden ist, wenn Aussage:

#include < stdio.h > //include the stdio.h header file in your program
void main ( ) // Start of the main
{
int num; // declare variable num as integer
printf ("Enter the number"); //message to the user
scanf ("%d", &num); // read the input number from keyboard
if (num < 0) // check whether number is less than zero.
Printf ("The number is negative") // If it is less than zero then it is negative.
Else // else statement.
Printf ("The number is positive"); //If it is more than zero then the given
number is positive.
}



Zusammengesetzte Verwandtschaftstests

Um zusammengesetzte Verwandtschaftstests durchzuführen, liefert C-Sprache die notwendigen Einheiten. Ein zusammengesetzter Verwandtschaftstest ist eine oder mehrer einfache Verwandtschaftstests zusammen sind verbunden entweder durch das logische ODER die Operatoren oder das logisch einfach UND. Diese Operatoren werden durch Buchstabe Paare && // beziehungsweise dargestellt. Um komplizierte Ausdrücke in C zu bilden, können die zusammengesetzten Operatoren gewohnt sein. Die Syntax der zusammengesetzten Verwandtschaftstests ist, wie folgt:

a> if (condition1 && condition2 && condition3)
b>if (condition1 // condition2 // condition3)



Genistet wenn Aussage

, wenn Aussage selbst andere enthalten kann, wenn Aussage benannt wird, wie genistet wenn Aussage. Die Syntax von genistet, wenn Aussage wie folgt ist

if (condition1)
if (condition2)
statement-1;
else
statement-2;
else
statement-3;



Der folgende Beispieldruck die gegebenen Zahlen zusammen mit dem größten Zahlverwenden genistet wenn Aussage.

#include < stdio.h > //includes the stdio.h file to your program
main ( ) //start of main function
{
int a,b,c,big; //declaration of variables
printf ("Enter three numbers"); //message to the user
scanf ("%d %d %d", &a, &b, &c); //Read variables a,b,c,
if (a>b) // check whether a is greater than b if true then
if(a>c) // check whether a is greater than c
big = a ; // assign a to big
else big = c ; // assign c to big
else if (b>c) // if the condition (a>b) fails check whether b is
greater than c
big = b ; // assign b to big
else big = c ; // assign C to big
printf ("Largest of %d,%d&%d = %d", a,b,c,big);
}
//print the given numbers along with the largest number.



Aussage schalten

Die Schalterschachtel Aussage ist eine Multiweise Beschlußfassung Aussage. Anders als die mehrfache Entscheidung Aussage, die das verursachte Verwenden sein kann wenn-sonst, wertet die Schalteraussage den Bedingungsausdruck und die Tests es gegen die zahlreichen konstanten Werte aus. Während der Durchführung die Niederlassung, die dem Wert entspricht, daß die Ausdruck Gleichen genommen wird.

Der Wert der Ausdrücke in einem Schalterschachtel Aussage Muß müssen eine Ordnungsart d.h. Ganzzahl, Putzfrau, Kurzschluß, langes sein, usw. Doppeltes und Hin- und Herbewegung werden nicht erlaubt.

Die Syntax der Schalteraussage ist, wie folgt:

switch( expression )
{
case constant-expression1: statements1;
[case constant-expression2: statements2;]
[case constant-expression3: statements3;]
[default : statements4;]
}
O/P:
#include<stdio.h>
main()
{
int n=7;

switch(n) {
case 0:
printf("You typed zero.\n");
break;
case 3:
case 5:
case 7:
printf("n is a prime number\n");
break;
case 2: printf("n is a prime number\n");
case 4:
case 6:
case 8:
printf("n is an even number\n");
break;
case 1:
case 9:
printf("n is a perfect square\n");
break;
default:
printf("Only single-digit numbers are allowed\n");
break;
}
}




Previous Next

Schlüsselwörter: c ausbreitende Aussage, wenn dann Aussage, während Schleife Aussage, für Schleife Aussage, c Bruchaussage, Java Aussage, c Tutorial, c Syntax, Wertaussage, c Reihe, c Zeichenkette, c Beispiele, Beispielaussage


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.