Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the "condition" in C interview test?

Tags:

c

conditional

Would it be possible to print Hello twice using single condition?

if  "condition"   printf ("Hello"); else   printf("World"); 
like image 702
ryan Avatar asked Aug 28 '08 19:08

ryan


People also ask

What are the conditional statements in C?

C has the following conditional statements: Use if to specify a block of code to be executed, if a specified condition is true. Use else to specify a block of code to be executed, if the same condition is false. Use else if to specify a new condition to test, if the first condition is false.

What is C language answer?

Explanation: C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating system.


1 Answers

if ( printf("Hello") == 0 )     printf ("Hello"); else     printf ("World"); 

:-)

like image 126
Matt Dillard Avatar answered Sep 30 '22 19:09

Matt Dillard