Swift: print() vs println() vs NSLog()

A few differences: print vs println:The print function prints messages in the Xcode console when debugging apps.The println is a variation of this that was removed in Swift 2 and is not used any more. If you see old code that is using println, you can now safely replace it with print.Back in Swift 1.x, print did not add newline characters at the end of … Read more

Simple C scanf does not work? [duplicate]

When reading input using scanf, the input is read after the return key is pressed but the newline generated by the return key is not consumed by scanf, which means the next time you read a char from standard input there will be a newline ready to be read. One way to avoid is to … Read more