İbn
When we use the (if -switch) ? What the difference between words ?
Dima
wtf is difference between words
Danya🔥
$ diff if switch
İbn
quiz question?
just quastion !!!
İbn
wtf is difference between words
switch can only test for equality whereas if can test for any Boolean expression. switch tests the same expression against constant values while if-else-if ladder can use different expression involving unrelated variables. switch expression must only evaluate to byte, short, int, char, String or an enum. if doesn’t have such limitations. A switch statement will run much faster than the equivalent program written using the if-else-if ladder
M
Why do you learn C and not C++?
Interested in Malware Analysis/Exploit Development Plus I would like to start from low-level in order to understand better programming principles, so I can learn easily languages useful for my future job (Python —>business/finance)
M
C for my pleasure python for the job
M
yeah not financial engineering/quant
M
why ahahah
Anonymous
What is the best way to learn the data structures and algorithms
Anonymous
Anonymous
Data structures and algorithms Seems pretty boring so how to make it interesting ?
shuzuya
Which one
Let me check or an intro via tutorialspoint
Ludovic 'Archivist'
any details about these? GitHub issues or whatever
People that submitted that got... erm religious backlash on reddit mostly
paper
is really python used in finance? i thought that finance is more c++ than python
Maybe in financial systems but financial analysis is fine with every language
X
but I should recommend you to learn the data structure and algorithm before diving into code
X
it also differs from your background or what you wanna be, what you wanna do in the future either
Ибраги́м
A brief introduction to Time Travel Debugging - Chris Croft-White - CPPP 2021 - YouTube https://m.youtube.com/watch?v=YA4--v_0DNA&feature=youtu.be
Margo
Can't understand lvalve??
I sent you a private message
Dima
lol
Ali
How Write a pseudocode algorithm that converts infix expressions to equivalent prefix expressions ????
\Device\NUL
Who told you that ?
I found many articles saying C++ STL is bad
Artur
Have you got commercial experience ? 😅
Artur
The reality is that it’s used pretty much everywhere
\Device\NUL
Have you got commercial experience ? 😅
Nope, i've no experience. that's why i asked
Pavel
I found many articles saying C++ STL is bad
A lot of people from other languages think it's bad because it 1) doesn't contain a lot of stuff that is common for other libraries 2) very unintuitive after working with functionality of other languages But in fact, not having extra stuff actually makes sense (yes, it sounds strange) and the library is pretty consistent with itself for the most part (there are things that can be improved of course, but there always are).
Pavel
Like having contains() function on a vector could be very handy, but a lot of people will use it to write very inefficient code.
Anonymous
your welcome
Anonymous
I have the basics
Anonymous
and I will start to oop
Anonymous
oriented object programming
Anonymous
what about you guys
Faramarz
Can someone help me to understand how to solve this problem? When I run my code on the terminal it shows me this message: zsh: segmentation fault Actually, problem is that I'm trying to get a string for *fname which is in the structure by scanf("%s", myarray->fname); but doesn't work properly
Faramarz
Can someone help me to understand how to solve this problem? When I run my code on the terminal it shows me this message: zsh: segmentation fault Actually, problem is that I'm trying to get a string for *fname which is in the structure by scanf("%s", myarray->fname); but doesn't work properly
#include<stdio.h> #include<stdlib.h> #include<string.h> #define LIMIT 50 typedef struct{ char * fname; char * lname; int * show; }record_t; record_t * createArray(int maxsize); record_t * insert(record_t *myarray, int *maxsize, int *currentsize); int main(void) { int maxsize; printf("Enter a size for the dynamic array: "); scanf("%d", &maxsize); record_t *myarray = createArray(maxsize); int currentsize = 0; int option = -1; myarray = insert(myarray, &maxsize, &currentsize); free(myarray); myarray = NULL; return 0; } record_t * createArray(int maxsize) { record_t * arr = (record_t *) malloc(maxsize * sizeof(record_t)); if(arr == NULL) { printf("malloc error in createArray...program exiting\n"); exit(1); } return arr; } record_t * insert(record_t *myarray, int *maxsize, int *currentsize) { scanf("%s", myarray->fname); return myarray; }
\Device\NUL
You only allocate struct, the members for char pointer and int aren't allocated
\Device\NUL
So it pointing to random address because it's undefined
Евгений
And why do you think despite being "weak" (according to you), java still being used widely in industry? Maybe to maintain the legacy codebase?
Widely?? You can't run a factory with java, you can't run your BMW with java. In mobile games only? Okay. That's fine. You can't even imagine how widely C is used.
J
Widely?? You can't run a factory with java, you can't run your BMW with java. In mobile games only? Okay. That's fine. You can't even imagine how widely C is used.
How widely exactly??? (Also why should anyone use C or any programming language to Run BMV)(Also, since I don't own a BMW, if you are mentioning about auto driving, doesn't OpenCV(a C++ library used widely for Computer Vision) lack bindings for C(But has bindings for other OOP languages like Python and Java along with C++)?)
J
And why do you think despite being "weak" (according to you), java still being used widely in industry? Maybe to maintain the legacy codebase?
I believe what they meant by weak is due to GC, it has a runtime cost compared to something like C or Cpp
Евгений
I recommend you to forget about Python. Use it only at home for yourself. All libraries for Python are written by crazy hackers in C language. If you wanna use a language just for fun, go on with Python. It's okay a good language to destroy the understanding of programming:))
Евгений
Евгений
But I really strongly recommend you to start with C++
Евгений
Step by step. No hurry. And you get it.
J
I recommend you to forget about Python. Use it only at home for yourself. All libraries for Python are written by crazy hackers in C language. If you wanna use a language just for fun, go on with Python. It's okay a good language to destroy the understanding of programming:))
Keras is written in Python, scikit-learn is also written in Python along with many ML implementations.(So, python is not a bad language as it has its own purpose).(Also, efficiency of program depends on the programmer and not the programming language itself. Eg: Ryujinx(C#, garbage collected) vs Yuzu(C++))
Anonymous
There are so many videos on YouTube and books on Google
Anonymous
In Hindi or English
Rajeev
Python : for user friendly code C/C++ : for hardware interactive in deep.
Anonymous
Free code camp 31hours yt tutorial *Edit link added.
Jagrat
Ok i remember this
J
Then you are looking for courses related to C++ for UE4. (Since the coding style of UE4 C++ is a bit different from modern C++(17/20)). There are many UE4/5 courses on youtube
J
If you have no prior programming experiences, I will recommend cherno's C++ tutorials. Else,
M
For arduino it’s better C or C++?
✞✟✞✟✞
For arduino it’s better C or C++?
Neither one is just “better”, it all depends on what code you write
Klaus
Can u solve a que for me
Ludovic 'Archivist'
Haha, garbage collector. Now I understand. Go on with Python and don't ask stupid question.))
Oh a garbage collector in C, now that is an interesting assignment I could hand my students