Skip to main content

Posts

Showing posts with the label Printf and scanf operator in detail

C tutorial #lecture4

Newline operator: It is a formatting operator used to make the text appear  on new line  It is always used between "&". Printf() and scanf() functions: When we calculate something say a particular sum or if we need to display something in the screen then we use printf () function.  To use this function we need to include <stdio. h> file first to use both functions. General format of printf is  Printf("<format strings>", <list of variables>) ; Format strings contain some format specifiers like given below: %f for printing real value.  %d for printing integer values  %c for printing character value.  Let's understand the use through the code: We are converting rupees into dollars source code Output.  Printf can not only print values of variables but it can also print results of an expression but using these expressions is optiional.  See the code below...