C# Questions Answers-C# operators (PartI)


C# operators (PartI)

1. Which of the following are not unary expressions?
a. a+b   b.++a   c. a+=1 Check answer 2. Which of the following are binary expressions?
a. a+b   b.++a   c. a+=1   d. a++ Check answer 3. If originally x=10, what is the value of x after each of the expressions:
a.++x     b.x++ Check answer 4. If x=10 and sum=0, what is the value of sum after each of the expressions:
a.sum=++x     b.sum=x++ Check answer 5. If originally x=10 what is the value of each of the expressions:
a.--x     b.x-- Check answer 6. If originally x=10 and sub=0 what is the value of sub after each of the expressions:
a.sub=--x     b.sub=x-- Check answer 7. If originally x=10 and y=5 what is the value of each of the expressions:
a.++x+y   b.--x+y   c.--x+(++y)   d.--x+y-- Check answer


Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.