Dima
Please, just try to write it first
Dima
then ask your problems
Dima
“give me a code/program” requests are not welcomed here
Anonymous
Yas🥺
Okay.. Just check elements at even location in array.. And check..which element is occurs most number of time (of course repetition have to be checked) That should the answer..now write program by yourself
Anonymous
If array starts by 0 ..then chk for odd index elements
Lelouch
Anonymous
Anonymous
Why it is so?
Dima
Why won’t you read the rules?
Anonymous
It's asking for test cases first So..first enter number of test cases
Oleksandr
Why it is so?
illogical.. don't use\think about it
Anonymous
I was asked this in an interview?
Dima
Silly interview
Anonymous
In first one.. Compiler gets confused to which value have to be taken for x
Anonymous
Hahaha
Dima
Imagine such questions at interview lol!
Dima
I would be at super duper senior position instead of all developers now
klimi
Silly interview
I want to know too :<
Anonymous
In second one...x acts as preprocess..
Anonymous
In second one...x acts as preprocess..
What do you mean by preprocess?
Anonymous
And how preprocessis helping in compilation?
Anonymous
What do you mean by preprocess?
Which are pre processed during compilation process
Anonymous
They are declared before main function
Ludovic 'Archivist'
volatile int arr[d1][d2];
Can't complain of cache misses if everything must be synchronized
Anonymous
And from now..where ever you will use x in code.. Value 5 will reflected there
Anonymous
e v e r y w h e r e
Yeah..that's what I mean to say
Anonymous
Can't complain of cache misses if everything must be synchronized
This type of language is not understandable for me . I mean it's so high level for me .😢
Dima
low level*
Anonymous
In terms of coding
Anonymous
How two time definition is allowed in preprocess but not inside main?
Dima
scope represented as { }
Anonymous
How two time definition is allowed in preprocess but not inside main?
In main..it's local variable inside function.. As preprocess..it's global variable
Anonymous
Yes I got that. So my question is why only global variable has the facility to be defined twice?
Lelouch
Decode the logic and print the Pattern that corresponds to given input if N = 3 then pattern will be : 10203010011012 4050809 **607 If N - 4 then pattern will be 1020304017018019020 50607014015016 **809012013 **10011 - Constraints 2 < = N < 100
Anonymous
Previous one
Lelouch
Anonymous
I want copy pen for this..and I'm very tired . Sorry this time..I can't
Anonymous
Dima
No assignments.
Anonymous
Should I write a unit test before writing the code itself? Is TDD the go-to proper programmer practise or are there alternatives? In the context of C/C++ programming.
Anonymous
E.g. I have a class and a concept of a method I need to implement. If my understanding is correct, I should write a test case for my method and write the code for that method afterwards.
Anonymous
Should I write a unit test before writing the code itself? Is TDD the go-to proper programmer practise or are there alternatives? In the context of C/C++ programming.
Extended waterfall model can enable you to do that.. There's.. backtracking is possible.. But I exactly not know bro
Александр
16=4^2
Anonymous
Do you talk about prototyping methods first... Before creation of code..?
Not just prototyping, but writing a unit test case before writing the code.
Nameful
If a function can be static, do you make it static?
Dima
Yes
Dima
No
Dima
Yes, but actually no
kλletaa
What is the point of a "static function"?
Nameful
To be clear, I'm talking about C++ static (member?) functions, not the C ones
Lelouch
kλletaa
To be clear, I'm talking about C++ static (member?) functions, not the C ones
it can only be called from inside the class, if i understand it correctly
Lelouch
Someone help about pattern
Nameful
It can be called from anywhere, without requiring an instance of the class
kλletaa
yes, i misunderstood it, sorry
Nameful
yes, i misunderstood it, sorry
exactly, it's a bit weird
Александр
??
Are you asking about case, marked as **?
Nameful
What I'm wondering is if there's any reason to not make functions static in C++, if they can be
Oleksandr
may be i don't understand what u want to say, so... are u really think, that all methods in C++ should be static?
Oleksandr
What I'm wondering is if there's any reason to not make functions static in C++, if they can be
okay, than... what the diffrence between static method in class and some function in namespace?
Nameful
may be i don't understand what u want to say, so... are u really think, that all methods in C++ should be static?
No. But sometimes they can be static because they don't touch anything that requires an instance of the object
Nameful
so what I wonder is whether I should make them static in that case
Oleksandr
both don't use "class fields", both don't need to have an object to call from
Oleksandr
u suggest to use Class like a namespace))
777
** and pattern too
Pattern scanner ?
Lelouch
Lelouch
Lelouch
Input will be single N