quiz1SoluVer2

quiz1SoluVer2 - those who will be controlled by computers....

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE182 Applied Problem Solving with C# Quiz #1 First Name (print): ____________________ Last Name (print):_________________________ 1. For below segment of code, answer questions: line1 Console.Write(“Lewis Eigen said :\"The professionals of ”); line2 Console.Write (“ the world will soon be divided into two ”); line3 Console.Write (“ groups.Those who will control computers and \nthose ”); line4 Console.Write Line(“ who will be controlled by computers. ”); line5 Console.Write (“ It would be best for you to be in the former group.\" ); (1) How many lines will be produced? [1 pts] 3 lines (2) What is the output? [2 pts] Lewis Eigen said:"The professionals of the world will soon be divided into two groups.Those who will control computers and
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: those who will be controlled by computers. It would be best for you to be in the former group." 2. Point out the SIX syntax errors in the following code: [3 pts] using System ; //1. add ; namespace Sample ; //2. ; should be eliminated { class Sample _ Test //3. no empty space is allowed in the class name { static void Main(string[ ] args ) //4. keyword void is added { Console.WriteLine( Just an exercise ) ; //5. add double quotes //6. ; is added } } } 3. Use escape sequence to write segment of codes to display the following output. [4 pts] Laugh Loud Think Happy Console.WriteLine( Laugh \t Loud ); Console.WriteLine( Think \t Happy );...
View Full Document

Ask a homework question - tutors are online