Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22250

Printf long long int in C with GCC?

$
0
0

How do I printf long long int and also unsigned long long int in C99 using GCC?

I have searched the other posts which suggest to use %lld but it gives these warnings:

warning#1: unknown conversion type character 'l' in format [-Wformat]|
warning#2: too many arguments for format [-Wformat-extra-args]|

For the following attempt:

#include <stdio.h>int main(){   long long int x = 0;   unsigned long long int y = 0;   printf("%lld\n", x);   printf("%llu\n", y);}

Viewing all articles
Browse latest Browse all 22250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>