I can not understand Visual Studio code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I can not understand Visual Studio code?

I wrote printf ("%lld", sizeof (int ) ) ; in Visual Studio code, but it error why? This code works in Dev C++. What is the reason?

3rd Sep 2019, 5:23 AM
Ахан
Ахан - avatar
4 Answers
+ 5
In order to be able to help you, please quote the error text verbatim and in full.
3rd Sep 2019, 6:24 AM
Computer Engineer
Computer Engineer - avatar
+ 3
Try using "%llu" or "%I64u" (Windows specific) as the format specifier, maybe it works (no guarantee).
3rd Sep 2019, 6:31 AM
Ipang
+ 1
Computer Engineer ide vsc i typed in main { printf ("%d", sizeof (int)) ;} and I entered in the terminal gcc - Wall file. C, and I output a warning : format '%d' expects argument of type 'int' , but argument 2 has type 'long long unsigned int' , but I replaced printf("%lld", sizeof (int)) ; also such errors. This code works great on devC++..
3rd Sep 2019, 7:14 AM
Ахан
Ахан - avatar
+ 1
Ipang thanks, but no working
3rd Sep 2019, 7:18 AM
Ахан
Ахан - avatar