Pavel
Built in the language itself
Pavel
Anonymous
How i can make like adobe programs
Anonymous
How i can make like adobe programs
If you ask, you can't
Anonymous
Why
Anonymous
Why
Because you can't 😂😂
Anonymous
I have a team
Anonymous
Why
If you could, you'd probably knew what to study
Pavel
Is it right than C++ is fork from C99?
Wait, C99 was released later than C++, isn't it? Oh, sorry, I don't know why telegram opened this old message to me
Anonymous
Hello everyone
Anonymous
Hello everyone! Have a look and see if you can help out with this project https://github.com/ethernity-cloud?tab=overview&from=2021-01-01&to=2021-01-31
Rajputana
We have taught that double data type only print value upto 15 decimal places but when I write it in the program and print upto 16 decimal places it works why please explain?
Pavel
other digits contain garbage
Pavel
I'm not sure about the actual precise digit count, but 15 near zero looks close
Rajputana
it's precise until up to 15 decimal places
But it was precise upto 16 decimal places how?
Suka
But it was precise upto 16 decimal places how?
16 decimal for maximum value (2^52) 4503599627370496 so every value < 2^52 is accepted cmiiw
Rajputana
Clear now thanks.
Bikash Kumar
Hello
Anonymous
Is there some way to generate pseudo random integer without using rand() function giving lesser number of collisions??
Epiginosko
Hello
Epiginosko
Anyone here know SQL SEVER🙏🙏🙏
Pavel
Is there some way to generate pseudo random integer without using rand() function giving lesser number of collisions??
Is it C or C++? In C++ there are other pseudorandom numbers generators available in the standard library, such as Mersenne Twister. For C you can find a library or code implementation for a random generator.
Samu
Hello guys
Ludovic 'Archivist'
Is there some way to generate pseudo random integer without using rand() function giving lesser number of collisions??
If you are willing to trouble yourself a bit you can copy and paste the arc4random implementation from OpenBSD source code and prune the dependencies then use that immediately
Ludovic 'Archivist'
This solution will give you high quality random. You can lower the number of rounds to 8 instead of 20 to get a significant boost of performance at the cost of the cryptographic grade quality of the generator (it is still more than good enough)
labyrinth
why is it legal to read & write across the allocated memory border of heap?
labyrinth
example, malloc a char[100] and i can perform read and write on the index of 1005
Diego
Becauuuse
Diego
An array is not what you'd think of, it's not an "object"
Diego
It's simply a bunch of objects allocated next to each other
Diego
And the index operator [] is literally only doing the equivalent of startingPointer + (sizeof(object) * index)
Diego
It doesn't do any bounds checking, you have to do them yourself
Anonymous
`#include<stdio.h> int main() {int n[5]; int a,b,c,i; for (i=0;i<5;i++) { printf("enter no %d",i); scanf("%d",&n[i]); } void maths(&a,&b,n[5],&c,int i); printf("sum is %d,mean is &d,std is %d,a,b,c"); } void maths(int *sum=0,int *mean,int n[i],int *y,int i) {int x=0; for (i=0;i<5;i++) {*sum+=n[i];} *mean=*sum/i; for (i=0;i<5;i++) {x+=pow((n[i]-*mean),2);} *y=sqrt(x/i); }`
Anonymous
can someone check this code and why is this giving error...its to find sum ,mean and std dev of five nos entered through array
Anonymous
ps ignore the backticks
Anonymous
ig the array of numbers
Anonymous
and i also included math.h
Talula
But you can’t write like that in arguments…
Anonymous
your code is too much wrong
can u suggest something on how to improve on thid
Anonymous
this
Anonymous
But you can’t write like that in arguments…
ohh...what should i write instead to retrive values?
Talula
And why are you passing the variable by reference which is supposed to be mean? If you’re just going to get result back use it in return function.
Anonymous
Talula
ohh...what should i write instead to retrive values?
You simply write it as *n for compiler I doesn’t even exist.
Anonymous
Sarthak
#include <iostream> using namespace std ; int main () { string password =" point break" ; string guess ; while(guess != password ) { cout << " Voice activation required :"; getline (cin , guess) ; if (guess != password) { cout << " ACCESS DENIED"<< endl; } } cout << " access granted" << endl ; }
Anonymous
1 do proper formatting
thanks..highly appreciated
Sarthak
Why my code always says access denied
Hanz
Why my code always says access denied
There is a space infront your password string
Hanz
You might input "point break" instead of " point break" Notice the space at char[0]
Hanz
Lemme try the code
Talula
how to store values of multiple return functions?cuz i need to retuen sum,mean and std deviation!!
Even if you want to return, you should use pointer to that variable so you could access the array and return the value not n[i] that means nothing.
Sarthak
What do you mean, this works
No still denied for right password
ninja
Why my code always says access denied
if your using linux use "sudo"
Hanz
No still denied for right password
Let me pm you for media
Talula
Thanks ...I just saw this mistake ..but it's still throwing error
Saw the mistake doesn’t mean correcting it right? If you corrected it what should I guess you did?
Yodin
Er
Wow
Hlo
Wow
Hi
Talula
example, malloc a char[100] and i can perform read and write on the index of 1005
You'll get GPF... but yeah you could do it and get away with it if you're lucky.
labyrinth
yeah it is not legal but can be done. i thought the kernel would have limit the access to the unallocated memory.
labyrinth
however, if I malloc a size of a memory page aka 4kb, and access half a page further (simply linearly increasing the pointer offset), it can be accessed. Does it mean there are multiple page registered at the page table?
Pavel
If you want to shoot your leg, nobody can stop you
Pavel
And this can allow some very dirty performance haxxs
Prem
Cpp
Prem
/get cppbookguide