Chroma
Chroma
someone to correct me,its somehow not working. its a cpp
Anonymous
Anyone have c/c++ interview questions and answers for freshers and experienced?
Anonymous
Can anyone help me out? I am trying to find the largest number in an array using the while loop.
Anonymous
//A program to find the largest number in an array #include <iostream> using namespace std; int main() { //I first declare my necessary variable int numbers[5]={9,1,87,4,43}; int max = numbers[0]; int i=1; while (i<5 && numbers[i]>max){ max = numbers[i]; i++; } cout << max; return 0; }
M
The while loop should not work in this code
M
It cannot meet the condition. Your code says: if i<5 (this is ok) and the first number is > itself, then...
Anonymous
Funny but my tutor asked me to do that and also using the do while loop
M
Try adding >= instead of >
Anonymous
M
Tell me if it works that way.
Anonymous
Still didn't work
Anonymous
Thanks
Anonymous
Thanks, it worked but I had to change the ++i to i++ and move it to the while braces instead. You really helped. Thanks very much.
Anonymous
Sorry about that, thought I saw braces but no braces works just fine. Thanks very much again.
Anonymous
Can you please explain why you left out the braces? Haven't seen anyone do that but you.
Anonymous
Thanks
Anonymous
I used the guidance of what you sent to create a do while loop of the same problem and it worked. I realized that the do loop is just a format reversed while loop which allows execution of statements at least once without having checked conditions in the first instance until the next. Thanks very much and sorry about what happened earlier once again. Guess my eyes were a bit tired.
Anonymous
😊
Anonymous
Are there any hackers hir?
Sasuke
Could you tell me similar for C?
Vishal
http://www.vishalchovatiya.com/what-is-design-pattern/
Anonymous
Sadly there are people who think that beeing good at Python makes them a genius...
So true, I literally forgot basic stuffs while I was totally into python. I feel garbage collected language are garbage
Anonymous
I saw that coming
Anonymous
I should have mentioned the scenario, my bad I take it back. I literally felt pathetic while using Micropython on a 4MB board, eventually moved to c++ for the same, may that memory hog was due to my bad programming but yes, c++ did the job better
Anonymous
It was standalone, standard io,
Sasuke
Could you tell me similar for C?
Sasuke
I mean order of reading books for C
Anonymous
True, I agree. Everything boils down to the need.
Anonymous
Lieutenant
Sorry if this is a noob, question But is it possible to make a weak hashing algorithm (like MD5) harder to reverse, by coding a custom (unique) implementation of the algorithm?
Lieutenant
Never say that Nothing is a noob question!
Alright, I'll remember that
Lieutenant
Small hash size?
Lieutenant
Hence making it easier to find collisions
Lieutenant
So, basically the hash isn't "hashed" enough in MD5?
Lieutenant
SHA family uses more transformations and bigger hash size. That's reason they're more secure?
Lieutenant
More transformations + big hash size = less speed, right?
Lieutenant
Right, got it
Lieutenant
Totally unrelated to the question, but How do you have such a broad knowledge of almost everything?
Lieutenant
Understood !
Anonymous
Hey
Anonymous
What is a function to get the key pressed outside the Terminal? ( Yes, I want to create a Keylogger )
Anonymous
What I can do
Ak
How to onen any path by using command prompt
Anonymous
How to onen any path by using command prompt
Use absolute or relative paths maybe
Anonymous
Is this for beginners?🤯😵
Anonymous
Am guessing 1 will work since d will also point to the same address?
Evil grin
Hey I have a doubt
Evil grin
If you have a non static function not inside a class Why is it possible to call it from s static function
Evil grin
So regular non static functions don't accept the implicit this pointer, hence no problem correct ?
Evil grin
Got it thanks a lot madhu
Anonymous
2 and 3, yeah?
Evil grin
Tried to google it and got no answers that were about regular functions
Anonymous
And what do you mean by succeed? Compiled?
Evil grin
Along with explanation pls
Abdurahmane
So books are your favorite way of learning things ? Just a question. I'm not an experienced programmer.
Anonymous
#include <iosteram.h>
Butikol12345
I have a question about c++ could anyone help me?? Please
Butikol12345
dontasktoask.com
Oh,soryy for this,but i really do not know anything rules, now i will read group rules. i m new participant
Anonymous
Sasuke
Which Segment does static variables declared in main or any other Functions resides ?
Евгений
Cmake.org is down. Where can I download cmake installer?
Евгений
Yes. I need cmake windows installer. I know that for linux it's stored in repositories.
Artöm
Not sure if they have mirrors. You might have to wait for website to work again
Евгений
Thank you very much.
Nils
Hi, I am having problems with garbage collecting or something like that... What does that mean: Error: call to deleted constructor of 'std::stringstream' (aka 'basic_stringstream<char>')
Nils
Hi, I am having problems with garbage collecting or something like that... What does that mean: Error: call to deleted constructor of 'std::stringstream' (aka 'basic_stringstream<char>')
Definition: long curlreq(std::stringstream httpcontent, std::string SID, std::string URL) Usage: long statuscode = curlreq(httpcontent, SID, "https://unterricht.sh.schulcommsy.de/room/" + room);
Nils
how? I feel nooby now lol
Nils
ahh, with &?
Nils
ahh, with &?
(Does not seem to work)
Nils
my function
Artöm
1 and 3 https://stackoverflow.com/questions/6322949/downcasting-using-the-static-cast-in-c