Asad
Better solution: generate random number in range [100, 999] and check until there is a match.
Asad
Credits to BogoSort authors
Talula
Talula
Or make 2 loops...
first one from -1000000 to 99 check if equal ... if it is then it's not 3 digit number...
Then make another loop from 1000 to 10000000, do the same...
Talula
Better...send the number to Google with search string "is "+x+" 3 digit number"... Use AI to get information from the result...
Asad
It is funny that there are billion wrong ways and only 1-2 correct way to solve any problem
Kl44
Hi
Can anyone please explain me the return values of system() function call?
💯💥
Write a program in prolog to find the summation of two numbers?
😊
M
Hello
Can we make socket and connection with specific dns ?
M
Igor🇺🇦
Asad
Pavel
Pavel
I mean if not for allocators and for operator new overloading (e.g. for detecting memory leaks), then I don't remember much uses of malloc in C++
telegram
Why main function calls itself?
💯💥
Anonymous
Need someone with webserver coding knowledge -high performance ,with no locks ,no SSL or TLS only cleartext,min. 2million RPS on 8 core pm me.
Preferred library LWIP, libaco, newlib, io_uring,mimalloc or instead of libaco this one :
https://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++.htm#benchmarks
Pavel
No !
Clue: it's named "C/C++"
It's for question and discussing these two programming languages. Questions about Prolog are offtopic here.
💯💥
Anonymous
klimi
Let's get this straight:
1. have you read rules?
2. Are you promoting your Website development services?
Vitaliy
klimi
1) sorry, no
2) no, i only need work
well what... should i do with you? you broke 2 rules... that is usually a ban in this group... also you have cross posted this to python group...
Diego
Why do you use them exactly?
For things when I want to create, say, an indexed collection of objects and I don't want to instantiate them all
Diego
I don't want to create a pointer array, but an array containing the objects themselves
Diego
So I usr malloc and memset, and keep an index and T's size internally
Diego
I used this once to make a message buffer
Diego
Diego
This is in case I don't have memory left, right?
This is useful, thank you
Igor🇺🇦
MAC
Anonymous
Hello everyone in this respected house here is a brother that want to learn basis of c++
Anonymous
I'm new here
Diego
Diego
There are projects that implement it in arduino but unless it's an ESP32 for example, it uses way too much flash for my liking
Anonymous
Eturnus
Hello ,can anybody please answer me
why we use nested structure in c language?
Anonymous
What is major diff bw struct and class
Anonymous
Alex
Anonymous
With the starting and ending time of work given find the minimum no of workers needed
Start time end time
1230 0130
1200 0100
1600 1700
Anonymous
Can anyone send code for this question
Anonymous
With the starting and ending time of work given find the minimum no of workers needed
Start time end time
1230 0130
1200 0100
1600 1700
Output:
2
Anonymous
Can anyone send code for this question
Anonymous
In C
Mar!o
We are not here to do your homework
Anonymous
Mar!o
Then why are you here?
To discuss different topics. Nobody is here to do the homework of a lazy child like you so fuck off
Anonymous
Then shut your mouth
Anonymous
Poda punda
Anonymous
Mar!o
Mar!o
Just go learn C. Oh guess we'll never see u again because you will never get it
Igor🇺🇦
Can we be civil here? No need to be rude even if someone thinks that others need to do their homework.
Anonymous
MAC
Mar!o
Diego
Mar!o
Anonymous
Hey guys I have a question
Anonymous
I tried searching on Google the difference in machine code of compilers and interpreters but it gave me a completely unrelated answer
Anonymous
Could someone help me understand the difference?
Anonymous
Anonymous
But I mean in the structure of their programs
Mar!o
Exactly
Well in general the assembly is the same.
The assembly is generated from some kind of IR (intermediate represenation) or SSA.
An interpreter itself does not compile to machine code,
it interpret's the code instruction by instruction. But an interpreter can have a JIT (just in time compiler) which translates the bytecode/IR instructions
into the local machine language. For that you also need an assembler for the specific architecture.
A real compiler does much more optimizing than an interpreter and has a more complex data structure of the code.
Some JIT compilers simple translate the virtual instruction set into machine code...
Mar!o
The most interpreters contain a virtual machine like for example CPython.
Then the JIT compiler can compile the virtual instructions to machine code to speed up the execution...
Anonymous
So basically an interpreter is just the same as a language translator and compilers truly understand the language like a native speaker
Mar!o