IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Control Instructions - Discussion

@ : Home > C Programming > Control Instructions > Yes / No Questions - Discussion

3. 

We want to test whether a value lies in the range 2 to 4 or 5 to 7. Can we do this using a switch?

[A]. Yes[B]. No

Answer: Option C

Explanation:

We can do this in following switch statement


switch(a)
{
    case 2:
    case 3:
    case 4:
       /* some statements */
       break;
    case 5:
    case 6:
    case 7:
       /* some statements */
       break;
}


Kamal said: (Fri, Mar 18, 2011 12:09:49 PM)    
 
It is only true when we are concerned with integer values.

Leszek said: (Sun, Jun 10, 2012 12:47:38 PM)    
 
THis question is wrong. Correct answer is "Maybe we can, maybe we can't. Depends on the value we want to test".

Write your comments here:
Name *:     Email:


© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!