answersLogoWhite

0

My self Dhilib...

it is a simple query. if statement is a basic control statement. mostly it used in all the languages. also in c plus plus

syntax:

if(test condition)

{

true statements;

}

else

{

false-statements;

}

Example:

void main()

{

int a,b;

a=54;

b=65;

if(a>b)

{

cout<<" a value is big";

}

else

{

cout<<"b value is big";

}

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Is the syntax between c and c plus plus different?

Yes


Make programme for multification of three no in c plus plus?

result = a * b * c;


What is different of c language and c plus plus?

Primarily OOP support, but there are minor syntax difference. By and large anything you can do in C you can also do in C++.


What are the steps to execute a c plus plus programme?

Build it, link it, run it.


What is extension part of c plus plus?

C++ Extension Name is... Syntax is: File Name.extension name. Ex: ankit.cpp


What is the syntax of printing a value in c plus plus?

std::cout&lt;&lt;42&lt;&lt;std::endl;


What did C plus plus add to the C language?

Object-oriented programming principals, a more consistent syntax and improved type-safety.


Bagian syntax yang di gunakan c plus plus?

C++ uses a syntax that is exactly the same as in C, with the addition of reserved words that are specific to C++. C ++ menggunakan sintaks yang persis sama seperti di C , dengan penambahan kata-kata reserved yang khusus untuk C++.


What is syntax in c plus plus for declaring a variable?

type variable {[optional array size]} {= optional initializer};


What is the syntax of c plus plus?

The answer is really beyond the scope of this site. You would probably need to buy a textbook.


Is c plus plus and java are the same?

No. Java takes some ideas from C++, so there are certain similarities, especially in the basic syntax. But it is a different language.


Can a user compile c programme using c plus plus compiler?

Usually, but not always. For example the following is legal in C, but illegal in C++: char new [3] = "ABC";