Anonymous
What so difficult in this question dude
i'm just beginner bro that's not tough for you but for me it is.
Dima
try it yourself
Dima
that’s how you practice
Anonymous
but i need help to know how to solve
Ashish Bhushan
i'm just beginner bro that's not tough for you but for me it is.
I mean you just have to define some variables in all data types....and then make input and output through them one by one
MᏫᎻᎯᎷᎷᎬᎠ
but i need help to know how to solve
This is not a guide go group It's just a not dumb question and you'll get your answer
Anonymous
I mean you just have to define some variables in all data types....and then make input and output through them one by one
sorry but i'm not getting will, will you help me by writting the whole program, if you have no problem then please help me .
Ashish Bhushan
Okk wait
klimi
#cs50
Anonymous
This is not a guide go group It's just a not dumb question and you'll get your answer
Then what group it is? i thought this group help to clear doubt and all.
Anonymous
Okk wait
Thank you so much. And sorry i told whatever that came in my mouth. I take my words back sorry guys.
MᏫᎻᎯᎷᎷᎬᎠ
Then what group it is? i thought this group help to clear doubt and all.
No we don't work that way It's about little bit advanced topics and straight question answers
Ashish Bhushan
Let it be guys...we can do it once...from next time he should take care of it
Ashish Bhushan
Navin try to solve these questions by yourself....google it do some research it will only help you
MᏫᎻᎯᎷᎷᎬᎠ
Oh sorry, i was unknown of it.
+ you got your warn not because of your question But because you broke one of the rules(not to get angry about not getting an answer)
Ashish Bhushan
Yes that's also a thing.... Don't abuse
Ashish Bhushan
Strictly don't abuse
Anonymous
okay
Anonymous
yes maam i read that before posting my query, so Klimi said it works only with whole numbers, i get that, thank you so much for ur reply. but whys that ? why wasnt it there back then, bc it was complicated or was it not used before, i beleive it was because of compatibility issues? who knows? anyone ? i can surely divide 1.4 with 1.1 and get 0.3 as my guy, my remainder, but what was the reason of not adding it back then.
Anonymous
👏🏼 claps, very well, got you. Thank you! youre the best
klimi
but also the precision thingy
Anonymous
but also the precision thingy
yes i had forgotten about the approximation thingy... oh its so beautiful, C is beautiful
Anonymous
Anyone has good experience in c programming?
Asdew
Ask your question.
Dima
Lmao wtf
Anonymous
I need the idea of how to solve this problem
Asdew
This is the worst I've seen.
Dima
/warn lmao why is this so funny
Ashish Bhushan
Really is this happening rn...and no one is telling him
Ashish Bhushan
Aah here we come
Ashish Bhushan
🤣🤣🤣
MᏫᎻᎯᎷᎷᎬᎠ
😂😂😂😂
Ajay
if (auto it = mp.find(key); it != mp.end() && it->second == value)
how should i optimally check if key is not present and hence assign it a value without accessing it the second time?
Ajay
how should i optimally check if key is not present and hence assign it a value without accessing it the second time?
i think insert will do the job as it will not overwrite the previously present pair.
Ajay
i think insert will do the job as it will not overwrite the previously present pair.
but is it possible to check if this key value pair is already present into the map using insert?
Ajay
got that, auto it = map.insert({key, val}); it.second returns true if it is already present.Right?
Ajay
why doesn't auto work here, i need to write the entire type?
Ajay
It works
yeah it works.
Anonymous
yeah it works.
What standard do you have?
Anonymous
got that, auto it = map.insert({key, val}); it.second returns true if it is already present.Right?
No true - there was insertion false - there was no insertion Use cppreference
Anonymous
You can do like this in C++17: const auto [iter, inserted] = map.insert...;
Dima
nice
Ajay
no i don't
Anonymous
I don't there's something hard if you want just use it
Ajay
i figured out everything.chill.
Anonymous
Any examples?
Anonymous
Both
Anonymous
Yeah using auto for return type is 🤢 in most cases I meant using auto for variables (except "reference" to bit in vector<bool>) Is there any downsides?
Francisco
There's functions that you know what the result looks like, but you don't care about the exact type. For example, std::count clearly returns some integral type, but you normally don't really know which one, so just use auto and you should be good
Francisco
It's weird because other languages that don't require explicit typing don't have this discussion. I don't see many people complaining about Python not having explicit types at declaration, yet everybody is fine with it
Anonymous
I prefer almost always use auto for variables
Anonymous
What is S9?
professor
hey guys, how can I make a proof of concept for generation fuzzing based since it is more based on reversing / file format ?
Newly
Guys i need to call one class to another class is there any method. How to do it
Newly
#googleit
I tried but doesn't work for C++. That's why posted here.
professor
how can I validate if its xml or pdf or any other file format in c++?
Diego
Can anyone help me with an API creation? This is the Encode process ____________________________________ int32_t text_7bit_encode(const char* txt_in, char* txt_out); txt_in: null-terminated ASCII string to encode, txt_out: 7-bit encoded string, null terminated ____________________________________ This is the decode process ____________________________________ int32_t text_7bit_decode(const char* txt_in, char* txt_out); txt_in: null-terminated 7-bit encoded string, txt_out: null-terminated decoded ASCII string, the function should return the size of the output data (>0) or error (<0). _______________________________________
Anonymous
How do I replace E to $? Like in the picture
Ashish Bhushan
Read the array in which it is stored and ....put the condition that when it finds E replace it with dollar symbol
Anonymous
is it strncpy ?
Ashish Bhushan
No it copies the whole string
Ashish Bhushan
Wait lemme share a link
Ashish Bhushan
C Program to Replace All Occurrence of a Character in a String https://www.tutorialgateway.org/c-program-to-replace-all-occurrence-of-a-character-in-a-string/
Ashish Bhushan
Here it's well explained in this page
Anonymous
Thanks ✨
Ashish Bhushan
😃
Kshitiz Pathak
How to understand and write recursion code? Can someone give me some tips for this?
Kshitiz Pathak
I find it little hard
Serenity
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> // Test cases: 5!! = 15; 10!! = 3840; long factorial(int n) { // HERE: DEFINE THE RECURSIVE DOUBLE-FACTORIAL FUNCTION if (n == 1) return 1; // base case in which the calculation is obvious else return n * factorial(n - 1); // the recursive call } long doublefactorial(int n) { if (n < 0) { return 0; // verifying it is a positive integer } if (n == 1) return 1; // base case else return factorial(n) / (doublefactorial(n - 1)); // the recursive call }
Serenity
Can someone turn the second function into a tail-recursive function ( based on factorial function assuming it is correctly implemented ) ?
Serenity
Can someone help implement the function above ?