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)
Write a programme to input 10 numbers from the user and print greatest of all
I have written the programme and there's some kind of coding mistake I guess.
The inputting part in working properly but finding and printing greatest number isn't.
#include<stdio.h>
int main()
...
Shikhar Singh
Votes: 0
Answers: 4
Is __builtin_ctzll(0) "undefined behavior" or just "undefined"?
GCC documentation says this about the __builtin_ctz family:
Returns the number of trailing 0-bits in x, starting at the least significant bit position. If x is 0, the result is undefined.
Until now,...
user1020406
Votes: 0
Answers: 0
strcpy() corrupts both strings if first argument is a char pointer
Define the following variables:
char *name1 = "Allan";
char name2[] = "Marco";
printf("%s %s\n", name1, name2); // Allan Marco
Then the following code works fine:
strcpy...
Ivan
Votes: 0
Answers: 2
Efficient type punning without undefined behavior
Say I'm working on a library called libModern. This library uses a legacy C library, called libLegacy, as an implementation strategy. libLegacy's interface looks like this:
typedef uint32_t LegacyFlag...
Drag-On
Votes: 0
Answers: 4