Question: Study the code below, and indicate what the output will be: string [ ] books = { Playing with the cats, Story time, Cooking with

Study the code below, and indicate what the output will be:
string[] books ={ "Playing with the cats", "Story time", "Cooking with the natives", "How to brew tea", "The unnamed book" };
int[] pages ={101,15,66,20,500};
foreach(string book in books)
{
Console.WriteLine(book +""+ book.Length);
}
a.
Playing with the cats 21
Story time 10
Cooking with the natives 24
How to brew tea 15
The unnamed book 16
b.
Playing with the cats 101
Story time 15
Cooking with the natives 66
How to brew tea 20
The unnamed book 500
c.
Playing with the cats System.Int32[]
Story time System.Int32[]
Cooking with the natives System.Int32[]
How to brew tea System.Int32[]
The unnamed book System.Int32[]
d.
1013
152
662
202
5003
e.
101
15
66
20
500

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 Finance Questions!