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" ) ;
else
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
Related Online Tests:
Comments
![]() | MANJUNATH HOSAMANI on 2011-02-01 01:47:10 wrote, confusing test |
![]() | rose hilda on 2011-04-24 05:54:27 wrote, ; should not be placed near if...else... statement. isn,t it |
![]() | rose hilda on 2011-04-24 05:54:50 wrote, its confusing |
![]() | nikita arora on 2011-07-07 13:05:54 wrote, ; after else is not error it means there are no statement in else and statement after else will be executed.......... |
![]() | nikita arora on 2011-07-07 13: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 00:53:21 wrote, learn about if.. else condition first.. |



