Computer Science > QUESTIONS & ANSWERS > computer science questions and correct answers with written progams (All)

computer science questions and correct answers with written progams

Document Content and Description Below

What are the two possible values for a boolean variable? Answer : True or False 2. System.out.println(b || !b); Answer : true 3. System.out.println( !b && ( 19 = = p) ); Answer : true 4. System... .out.println( (p!=29) && b && (p= =q) ); Answer : false 5. System.out.println( (q!=p) || b ); Answer : true 6. System.out.println( !!!b ); Answer : true 7. boolean c = ( b || ((p + 10)= = q) ); System.out.println(c || b && !b); Answer : true 8. boolean c = p = = q; System.out.println(c); Answer : false 9. !( (7>9) || (2= =2) && (8>2) && (3<22) || (16<=16) && (75!=18) ) Answer : false 10. What is output by the following? int x = 9, y = -3; if( !(x!=y) ) { System.out.println(“Fourscore and seven years ago”); } else { System.out.println(“our fathers brought forth…”); } Answer : our fathers brought forth... 11. What is output by the following? double j = 128.22, k = 129.22; if( (j++) = = k) j+=10; k+=10; System.out.println(j); System.out.println(k) [Show More]

Last updated: 2 years ago

Preview 1 out of 4 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$8.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

93
0

Document information


Connected school, study & course


About the document


Uploaded On

Jul 31, 2021

Number of pages

4

Written in

Seller


seller-icon
A grade master

Member since 4 years

39 Documents Sold

Reviews Received
0
0
0
0
2
Additional information

This document has been written for:

Uploaded

Jul 31, 2021

Downloads

 0

Views

 93

Document Keyword Tags

More From A grade master

View all A grade master's documents »

$8.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·