0% found this document useful (0 votes)
4 views4 pages

Computer

The document contains a series of multiple-choice questions related to programming concepts, specifically focusing on switch cases, conditions, and data types. Each question is accompanied by the correct answer, highlighting key programming principles such as the use of operators and data representation. The questions cover various topics including arithmetic operations, boolean data, and variable assignments.

Uploaded by

vinay.rishika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Computer

The document contains a series of multiple-choice questions related to programming concepts, specifically focusing on switch cases, conditions, and data types. Each question is accompanied by the correct answer, highlighting key programming principles such as the use of operators and data representation. The questions cover various topics including arithmetic operations, boolean data, and variable assignments.

Uploaded by

vinay.rishika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment 10

I. Multiple choice questions


Tick the correct answer:

Page 175

1. In aswitch case, when the switch value does not respond to any case then
the execution transfers to:

a) a break statement
b) adefault case
c) aloop
d) none

ANS: b) adefault case

3. Condition isessentially formed by using:

a) Arithmetic operators
b) Relational operators
c) Logical operators
d) All

ANS: d) All
4. If (a>b)&&(a>c) thenwhich of the statement is true?

a) b is the smallest number


b) b is the greatest number
c) a is the greatest number
d) allof the above

ANS: c) a is the greatest number

9. Which of the following statementsaccomplishes fall through'?

a) for statement
b) switch statement
c) if-else
d) none

ANS: b) switch statement

Page 92

4. If int a=25, b=5,c=0; what value is stored in c? when c=a%b;


a)s.0
b) 5
c) 0
d) none
ANS:c) 0

6 double c, int x.V.2, w-5, y-10, 7-11, t-x'v 2/) The valuo storod in cis
a) 550
b) 555
c) 55

d) none

ANS:a) 55.0

7. int m,p; m=5; p-0; p=m m; The output will be

a) 11

b) 10
c) 8
d) 12

ANS:c) 8

Poge 63

1 Aconstanit which gives tthe exact representation of data is called

a) Variatule

b) Litetal
) ldentifier

d) Character
ANS: b) Literal

3. Acharacter literal is assigned to a:

a) Char variable
b)Char type literal
c) String variable
d) String literal

ANS:a) Char variable

10. Boolean data is used to test a particular condition i.e. true or false. Which
of the following is a correct representation?

a) boolean m=true

b) boolean m= 'true'
c) boolean m= "true"
d) none

ANS:a) boolean m=true

You might also like