1304 questions
rand() is always positiveBut why is land() + land() a mixture of positive and negative numbers?srand(time(NULL)) seeded and spun, is it related to that?Is there a case where rand() returns a negative ...
Why doesn't printf automatically print out if you don't write the opening letter?Is that what POSIX decided? How do I automatically print out every time I printf()?
As far as I know, alloca() dynamically allocates memory in stack, not heap, and releases memory on its own when it returns from routine Then shouldn't it be recommended because it's safer because it d...
The professor told me to use the discharge variable only when it's really inevitableWhy is that?If there are more functions, it's hard to transfer factorsThis is too much trouble
In the initialization list, in the order in which you wrote down the code,I wrote the code thinking that initialization was happening.For example, class A{private: OtherClass var1; AnotherClass var2;p...
It's a code that my friend sent me, saying she found a weird function1[a] It compiles well and executes well.What's going on here?int main(){ int* a = (int*)malloc(sizeof(int)*2); a[0] = 1; a[1] = 2; ...
I have a question about the static function, not the c++ static method.I know the static variable, but what is the static function?Also, if you define void myfunc() in another c file and include this ...
How do you use boolean type in C?bool , true, false all red lines appearedThen do I have to solve everything with 1/0 for C?
I saw the C chordWhy did they bother writing it like that instead of writing it as 1, 0?Is there anything better?#define TRUE (1==1)#define FALSE (!TRUE)
As far as I know, there's a bowl only on C++, and you have to define it on CI saw you write boolean in the Linux kernel code.Did I get it wrong? TT?
« | - 60 - | » |
© 2024 OneMinuteCode. All rights reserved.