Give the syntax of if-else statement, Computer Engineering

Assignment Help:

Give the syntax of "if-else" and "switch" statements and explain.

if else

This is used to decide whether to do something at a special point, or to decide between two courses of action.

Syntax of  if else

if (conditional expression) Statement1;

else

Statement2;

The following test decides whether a student has passed an exam with a pass mark of 45 if (result >= 45)

printf("Pass\n");

else

printf("Fail\n");

It is possible to use the if part without the else.

 

 


Related Discussions:- Give the syntax of if-else statement

How address symbol table is generated, Address symbol table is generated by...

Address symbol table is generated by the  (A) memory management software.  (B) assembler.  (C) match logic of associative memory.   (D) generated by operating system

What is ''LRU'' page replacement policy, 'LRU' page replacement policy is ?...

'LRU' page replacement policy is ? Ans. Least Recently Used.

How to create a layout table in dreamweaver, Q. How to Create a Layout Tabl...

Q. How to Create a Layout Table in dreamweaver? In last section you used cells to create a table. Now, you will see how to start with a table and add cells later. 1.  In Obj

Determine a program that is in execution, Determine a program that is in ex...

Determine a program that is in execution is known as Program in execution is known as Process

When do you do load and performance testing, We perform load testing once w...

We perform load testing once we are completed with interface (GUI) testing. Modern system architectures are large and difficult. Whereas one user testing primarily on functionality

Which rule is used for the expansion of nested macro calls, The expansion ...

The expansion of nested macro calls done by using of? Ans. LIFO rule is used for the expansion of nested macro calls.

Explain semaphore, What is a semaphore? Semaphore: It is a synchroniz...

What is a semaphore? Semaphore: It is a synchronization tool which gives a general-purpose solution to controlling access to critical sections.

Demultiplexers, Explain briefly about demultiplexers?

Explain briefly about demultiplexers?

Coa, Whats the use of coa

Whats the use of coa

De multiplexer, design a gray to bcd code converter using 16:1 de multiplex...

design a gray to bcd code converter using 16:1 de multiplexe

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd