FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
this function is used to print data on the console
A
0 VOID
B
PRINTF()
C
SCANF()
D
GETCH()
Explanation: 

Detailed explanation-1: -When you use the printf() function, it prints the string pointed out by the format to the standard output stdout. The format can also contain some specifiers that start with a % and replace values of variables with the printf() function.

Detailed explanation-2: -The printf() function sends a formatted string to the standard output (the display). This string can display formatted variables and special control characters, such as new lines (”), backspaces (’’¯) and tabspaces (’); these are listed in Table 2.1.

Detailed explanation-3: -The Java printf function helps simplify the task of printing formatted output to the console, terminal window or log files. The Java printf function makes it easier to create informative strings of text without using String concatenation, or relying on non-standard characters that might trigger output errors.

Detailed explanation-4: -Generally, printf() function is used to print the text along with the values. If you want to print % as a string or text, you will have to use ‘%%’. Neither single % will print anything nor it will show any error or warning.

Detailed explanation-5: -println(): println() method in Java is also used to display a text on the console. This text is passed as the parameter to this method in the form of String. This method prints the text on the console and the cursor remains at the start of the next line at the console. The next printing takes place from next line.

There is 1 question to complete.