answersLogoWhite

0


Best Answer

#include<stdio.h>

void main()

{

int a=10,b=15;

clrscr();

if(a>b)

printf("%d is the large number",a);

else

printf("%d is the large number",b);

getch();

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

There are a bunch and this should be expanded. I am currently tired and don't want to write them all and check my work to ensure the syntax is correct.

Basic conditional statements include...

if, for, do, while, and case (switch) statements.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

The same as in MS visual C, GCC and any other version of C.

The conditional statement has two forms:

if( expression ) statement

If the expression evaluates to nonzero, then the statement is executed, otherwise it is ignored.

if( expression ) statement elsestatement

If the expression evaluates to nonzero, then the first statement is executed, otherwise the second statement is executed.

In either form, the statements may be a single command, or may be multiple commands enclosed within braces {}. The statements may also be if statements themselves.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Any statement that executes as the result of a conditional expression being evaluated true is a conditional statement.

if(<conditional_expression>)

// conditional statements go here

else if(< conditional_expression >)

...// conditional statements go here

else

...// conditional statements go here

switch(conditional_expression)

{

case(condition_1): // conditional statements go here; break;

case(condition_n): // conditional statements go here; break;

default: // conditional statements go here

}

while(condition_expression){

// conditional statements go here

}

do{

// conditional statements go here

}while(conditional_expression);

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

The ternary operator (?:) is the conditional operator. It is ternary because it is the only operator that has three operands. They are:

conditional_expression ? true_expression: false_expression

The conditional_expression must be a Boolean expression evaluating true or false. If the expression evaluates true, the true_expression is evaluated, otherwise the false_expression is evaluated.

Note that unlike an if() statement, the conditional operator can be used as an expression in its own right:

void foo (unsigned n) {

for (unsigned i=0; i

}

In this example, the expression (i=n-1) ? "" : ", "evaluates to the string ", " (the false expression) for all i

foo (10); // output: "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

#include

int main()

{

int a,b;

printf ("Enter a number:\n");

scanf("%d",&a);

a==b;

printf("%d is equal to b",b);

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

if, else, for, while

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

rerhe

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use the conditional statement of turbo c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the conditional statement of turbo c plus plus dos based?

Statements that check an expression then may or may not execute a statement or group of statements depending on the result of the condition.


How do you use a C-continue statement in a block- without any looping or conditional statements?

In the C language, the continue statement can only be used within a loop (for, while, or do). Upon execution, control transfers to the beginning of the loop.


What is the use of header file graphics in c plus plus programming?

It has no use in C++ itself, it is only useful in Borland Turbo C++. It provides generic graphics support for Borland Turbo C++ applications.


What is tlink in c plus plus compiler?

TLINK is the Turbo C++ linker utility. You use it to link the object files created by the Turbo C++ compiler.


What is if in C?

If is a keyword that introduces a conditional expression. If the expression evaluates true, the statement or statement block that follows is executed, otherwise control is passed to the line following the statement or statement block, which may be another conditional expression. if( expression_1 ) { // do something when expression_1 is true } else if( expression_2) { // do something when expression_1 is false but expression_2 is true } else { // do something when both expression_1 and expression_2 are false }

Related questions

Conditional statement in turbo c?

Yes.


What are the conditional statement of turbo c plus plus dos based?

Statements that check an expression then may or may not execute a statement or group of statements depending on the result of the condition.


What is if statement in c?

if is a conditional statement to check the given condition


What also is true if a conditional statement is true A its contrapositive B its converse C its inverse D none of these?

A conditional statement is true if, and only if, its contrapositive is true.


How do you use a C-continue statement in a block- without any looping or conditional statements?

In the C language, the continue statement can only be used within a loop (for, while, or do). Upon execution, control transfers to the beginning of the loop.


What are the three looping statement in turbo C?

for,while,do while


What is return statement under function in turbo C?

return 0


What is looping statement in turbo c?

while, for, do-while (and perhaps goto)


How the turbo c plus plus use in the computer?

How the turbo c plus plus use what in the computer.


Where do turbo c programs begin excution?

At the first statement of function main.


Which term best describes a mathematical statement of the form shown below If A then B. A. Deductive statement B. Conjecture C. Proof D. Conditional statement?

[object Object]


Short note on conditional statements in c?

Use them carefully.