题解 | #printf的返回值#
printf的返回值
http://www.nowcoder.com/practice/a19ef1d8e55c4cc786f11cbf6b2fde61
C#的代码是这样的,字符串打印的返回值是字符串的长度,知道这个就能写出这个问题的答案了。
using System;
namespace BasicEx
{
class Ex9
{
static void Main(string[] args)
{
Console.WriteLine("Hello world!");
Console.WriteLine("{0}", "Hello world!".Length);
Console.ReadKey();
}
}
}
查看10道真题和解析