python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
type casting in C doesnt change 97 to 'a'
#include<stdio.h>
int main(){
printf("%d\n", (int)('a'));
printf("%d\n", (char)(97));
}
Why does the program above give the output
97
97
instead of
97
a

Matthias
Votes: 0
Answers: 5
Does std::format() accept different string types for format and arguments?
With printf I can do something like this
wprintf(L"%hs", "abc");
where the format is wchar_t * but argument is char *. Is this doable with std::format(), or do I have to convert o...
Reci
Votes: 0
Answers: 1
Why is sprintf with a %llu returning the letters "lu"?
uint64_t milliSeconds =getTimeMs64();
int timestringLength = 0;
timestringLength = snprintf( pBuffer, bufferSize, "%llu", milliSeconds );
Um, I'm more than confused. About to walk the disa...
mint branch conditioner
Votes: 0
Answers: 1
Type conversion issues unsigned char, string, hex
The following code has several issues - for which I'm kindly asking for your input / corrections / feedback - of various types: first, I can't get it to do what I'd like to, namely pass it a "wo...
cg79
Votes: 0
Answers: 1