What happened was that we tried printing a symbol that has a special, reserved meaning. The quotation mark is used for denoting the beginning and end of a String. We've started and ended a String "", after which we've opened another one " but haven't closed it. This makes printing ...
A period by itself implies a precision of zero. A precision may be replaced with an asterisk ("*"), which works exactly the same as for an asterisk minimum field width described above. The meaning of a precision depends on the type of conversion done. Only the conversions listed below are...
The following character sequences have a special meaning when used as printf format specifiers: \a audible alert \b backspace \f form feed \n newline, or linefeed \r carriage return \t tab \v vertical tab \\ backslash As you can see from that last example, because the backslash charact...
In this cheat sheet I’ll show all the examples using Perl, but at first it might help to see one example using both Perl and Java. So, here’s a simple Perl printf example to get us started: printf("the %s jumped over the %s, %d times", "cow", "moon", 2); And here are t...
It can be calculated in other way also. In case of left shift operation the result should be: (number)*(2^(no of bits to be shifted)). Here number is :255 No. of bits to be shifted is:2(as i<<2) So ans is: 255*(2^2)=1020 Was this answer useful? Yes 1 ReplyRelated...