C Language: Conditional Statements - Online Test

Test Difficulty Level: Medium

Syllabus of Test

C Language: Question based on Conditional Statements as - If, Else.

Sample Question from this online test:

Question: main( )
int x = 3 ;
float y = 4.0 ;
if ( x == y )
printf ( "\nx and y are equal" ) ;
printf ( "\nx and y are not equal" ) ;

Option A: x and y are equal

Option B: x and y are not equal

Option C: error

Option D: none

To answer, click the "Start This Test" button below.

Start this Test


MANJUNATH HOSAMANI on 2011-02-01 07:47:10 wrote,

confusing test

rose hilda on 2011-04-24 10:54:27 wrote,

; should not be placed near if...else... statement. isn,t it

rose hilda on 2011-04-24 10:54:50 wrote,

its confusing

nikita arora on 2011-07-07 18:05:54 wrote,

; after else is not error it means there are no statement in else and statement after else will be executed..........
so output will be 3,5 in q4...
check it in tc

nikita arora on 2011-07-07 18:09:19 wrote,

; after if means whether condition is false statement after it will be executed answer for q15 is 1,2.........

karthik ravi on 2011-10-21 05:53:21 wrote,

learn about if.. else condition first..

dont submit tests just for earning points.. U r so confusing.. workout before u submit.. u r driving others crazy..

pramit chanda on 2012-06-23 05:48:52 wrote,

quite interesting..........

pramod kumar on 2012-09-06 01:56:14 wrote,

I think so ,some program or statement is wrong

sarmistha swain on 2012-12-10 09:08:26 wrote,

one question given many times.wrong answer .bakwas