+ 1
I have a doubt when I run this code why int is 4 here ...?
11 Respuestas
+ 4
So why it's is returning 4 ??
+ 2
Yes I had read ...
But what is bytes and ..
Why %ld is used ??
+ 2
Okkk thanks ...😞😞😞😔😔
+ 2
Okk thanks for you help😊😊😊😊😊
+ 1
And how to I store values in it ...
+ 1
Do *
0
The code example on the first slide covers the use of `sizeof` operator. The `sizeof` operator returns number of bytes used (needed) to allocate a certain type, which is passed in as the operator's argument.
https://en.cppreference.com/w/c/language/sizeof
0
Because an `int` type requires 4 bytes in memory (not a mandatory specification, but common).
Did you read the page I linked?
0
Bro are you kidding me? you have 40+ codes but you say you don't know what a byte is?
https://en.m.wikipedia.org/wiki/Bit
https://en.m.wikipedia.org/wiki/Kibibytes
About %ld, we call it format / conversion specifiers. It's used basically to describe which data type to be used when reading or printing data.
http://www.cplusplus.com/reference/cstdio/scanf/
http://www.cplusplus.com/reference/cstdio/printf/
0
The C and C++ tutorials covers the basics on how to read, store and modify values. Please continue your C and C++ journey ...
0
Keep learning bro! 💪