Question: int k=7; if (k%3 > 1) k=10; else k=5; // what k will be? int k=17; if (k%5 > 2 || k/5 > 2) k=10;

int k=7; if (k%3 > 1) k=10; else k=5; // what k will be?

int k=17; if (k%5 > 2 || k/5 > 2) k=10; else k=5; // what k will be?

for(i=0; i < 5; i++) { ... } // How many loops will be executed?

for(i = -5; i < -1; i++) { ... } // How many loops will be executed?

for(i= 10; i < 5; i=i-1) { ... } // How many loops will be executed?

int[ ] x = new int[10]; Random r = new Random(); x[1] = r.Next(100); // Explain these 3 statements

List pNames = new List {"nut","bolt","nail"}; // Explain these lines

class Room { public string RoomID { set; get; } ... }// Explain these lines

public Room ( ) { ... }// Explain these lines

public override string ToString( ) // Explain these lines

Room BU04A = new Room(); BU04A.RoomID = "BU 04A"; // Explain these lines

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!