←to practical programming

Questions 3

  1. What is the mcs option to turn off all warnings?
    Hints: man mcs, mcs --help, or [dotnet compile options].
  2. What is the mcs option to turn off informational warnings?
  3. Rewrite this piece of code, x=(a>b?a:b), using the if statement.
  4. If you need mathematical functions from, say, cmath.dll library, how do you link your program with the library?
  5. What will the following piece of code print?
    int i=0;
    Write("{0}\n",i);
    Write("{0}\n",i++);
    Write("{0}\n",++i);
    
    Explain.
  6. Rewrite the loop while(condition)body using the for loop.
  7. Rewrite the loop for(init;cond;inc)body using the while loop.
  8. Rewrite the loop do body while(condition); using the for loop.