%z modifier -- try %u or %lu if you lack %zd - C Data Type

C examples for Data Type:int

Description

%z modifier -- try %u or %lu if you lack %zd

Demo Code

#include <stdio.h>
int main(void)
{
    int n = 0;/*from  w w  w .  j a  va 2  s  . c  o m*/
    size_t intsize;
    
    intsize = sizeof (int);
    printf("n = %d, n has %zd bytes; all ints have %zd bytes.\n", n, sizeof n, intsize );
    
    return 0;
}

Result


Related Tutorials