I_Interface
98
try replace ++ operator before x in y assingment
Anonymous
Is it wise in these days to learn how to write a make file
Anonymous
Yeah, I'd say so
Dima
98
because there types are primitive and are not references, you need to add & or change x directly
Anoop
Is it wise in these days to learn how to write a make file
Very helpful if you are working with Linux kernel and big projects
Anonymous
Ok but can't the ide do whatever you want
Anonymous
Eg. Let's say u are using visual studio on windows
Anonymous
It's still handy to do in case you need it
Anonymous
Like learning mental addition even though you have a calculator, cause you might not have the tools at some point
Anonymous
Why
Vladimir
because there types are primitive and are not references, you need to add & or change x directly
I also don't understand. It works with just 'x++', but not works in this example with assignment and sizeof. Why?
Anonymous
I thought ide like visual studio can do everything
Vladimir
Is it wise in these days to learn how to write a make file
It's not hard to learn, so why not.
Anonymous
Ok
Anonymous
Then I'll try
Vladimir
I also don't understand. It works with just 'x++', but not works in this example with assignment and sizeof. Why?
I figured out the point in 'sizeof' operator. For some reason ++ not works with it.
Anonymous
I figured out the point in 'sizeof' operator. For some reason ++ not works with it.
the operand inside the sizeof() operator is not evaluated. 
RBurtsev
Anonymous
What the reason of that behaviour?
This is what I was asking.??😐😐
Vladimir
This is what I was asking.??😐😐
Well now I'm asking too 😅
Anoop
This is what I was asking.??😐😐
If it's a variable array only then the operand is evaluated here it's a variable so it's not evaluated,simply returns the size of int
Vladimir
Please don't warn me, I got an answer myself in the google.
Anonymous
Please don't warn me, I got an answer myself in the google.
Mee to... Bt I can't share as I have got 1 warning earlier.😂
FOFANA
Are there any tools to convert C code to Python because i need the python equivalent for the below C code: Can anyone provide me the python code conversion for the below mentioned code #include <stdio.h> int main() { int kases; scanf("%d", &kases); while(kases--) { int N; scanf("%d", &N); for(int i = 1; i <= N; ++i) { if(i % 3 == 0 && i % 5 == 0) printf("FizzBuzz\n"); else if(i % 3 == 0) printf("Fizz\n"); else if(i % 5 == 0) printf("Buzz\n"); else printf("%d\n",i); } } return 0; } Regards, Sriyam
Dima
Seems to be easy, why won’t you rewrite it?
Anonymous
can someone suggest me an alternative bot to joinhidder bot
𝕵𝖔𝖘𝖚𝖊
/saved
𝕵𝖔𝖘𝖚𝖊
#freeprogrammingbooks
𝕵𝖔𝖘𝖚𝖊
#cppbook
𝕵𝖔𝖘𝖚𝖊
#cbook
𝕵𝖔𝖘𝖚𝖊
#howtoprogram
I_Interface
#howtoprogram
/report flood/spam
Dima
/warn spam
Dima
/report flood/spam
Doesn’t look like spam
Dima
just this system 😂
klimi
Mhm
I_Interface
Doesn’t look like spam
it's his 2nd time when he uses it :D
Chr
For python beginners which book is best
Chr
#freeprogrammingbooks
Chr
#findprojects
Chr
Python beginners books
Dima
Python beginners books
/warn python begginers warn
Dima
Why it’s so hard to read the rules
klimi
i wanted too
Sai Meghana
What is the C equivalent of this delaration... vector<int> num; ?
Badugar
What is the C equivalent of this delaration... vector<int> num; ?
There are no vectors in C like in C++. Look for variable length arrays, that's something related.
I_Interface
it was so hard to know today what C doesn't have boolean type O_o
Dima
or allocate on a heap
Dima
elements = (Element* )malloc(sizeof(Element) * count))
Sai Meghana
I have half a mind to switch to C++ now
Dima
turboc++
Sai Meghana
elements = (Element* )malloc(sizeof(Element) * count))
what if you don't know the count yet?
I_Interface
Sai Meghana
what if the Count depends on user input..
Sai Meghana
Dima
look at how simple vector implementation works
Dima
you can alloc with 4 or 8, the next time more elements requested -> *2 existing count
Badugar
IIRC C89 doesn't contain Booleans.
Only _Boolean, through an extra header.
Dima
so you can “grow” an array
Sai Meghana
and those newly added memory locations will be continous?
Anonymous
Can the heap overflow the the stack somehow?
Anonymous
I mean, the heap grows downwards and the stack grows upwards. Assuming the heap grows rapidly, it can overwrite the stack. Or am I missing something? "Downwards" and "upwards" are relative to memory address layout.
Anonymous
Yes, can happen
So can a memory leak vulnerability thus lead to exploitability, hence one can carefully engineer the payload to overwrite the stack with code, which redirects the control flow?
kamaraj
how to flip a bit without using conditionals or ternary operators. negations. bit operators. if input is 1 output is 0 is this possible?
Vladimir
it was so hard to know today what C doesn't have boolean type O_o
It is: typedef char bool; #define true 1 #define false 0
Anonymous
a^1?
That would fall under "bit operators" I think.
lock
why is this program causing me a segmentation fault? https://pastebin.com/c6kZAAC1