C programming flags and print function

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Flag: +

A sign character ("+" or "-") will precede the conversation (overrides a "space" flag)

Printf() function: c

Character

Flag:

If no sign (minus sign e.g.) is going to be written, a blank space is inserted before the value.

Flag: -

The converted value is left adjusted

Printf() function: lf

double

Printf() function: f

float values

printf() function:

function is a critical component when programming in C. It is used to output information from within the program as it executes. A simple example of the printf() function is: > printf("Hello World!") Hello World!

Printf() function: x or X

hexadecimal representation

Printf() function: l or ld or li

long

Printf() function: lu

long double

Printf() function: o

octal representation

Printf() function: p

pointer

Printf() function: %

prints % character

Printf() function: N

prints nothing

Printf() function: e or E

scientific notation or floats

Printf() function: d

signed integer

Printf() function: hi

signed integer (short)

Printf() function: g or G

similar as e or E (scientific notation)

Printf() function: s

string

Flag: 0

the conversion result will be zero padded for numeric values.

Printf() function: U

unsigned int.

Printf() function: i

unsigned integer

Printf() function: hu

unsigned integer (short)

Printf() function: llu

unsigned long long

Flag: #

used with o, x or X specifiers with the value is preceded with Used with o, x or X specifiers the value is preceded with 0, 0o, 0O, 0x or 0X respectively.


संबंधित स्टडी सेट्स

Vocabulary Unit 3 - The Day in 1923: The Olympic's the Thing!

View Set

Module 48 The Concept of Informatics

View Set

Unit 2 Challenge 2.2 Distributions and Measures of Central Tendency

View Set

US History: Emergence of Modern America - Chapter 26

View Set

Urinalysis - Test 2 - Units 3 & 4

View Set

Real Estate Principles Chapter 17

View Set