Lelouch
Stephanos
Most cases nothing
Stephanos
Lesson #3: Uniform Initialization – Mike's C++11 Blog https://mbevin.wordpress.com/2012/11/16/uniform-initialization/
Stephanos
Maybe the Link makes IT clearer
I_Interface
there is type converting to minimal type in { } if u init a sum var with different types: int, double, float for exmpl And no some compailer check, don't remember what exactly, maybe check for methods
Sid Sun
Of course
Sid Sun
You can use multi threading to create a large array until the kernel kills you
Sid Sun
But you won't get to 8GB easily, one process is limited to a certain amount of ram, you will need to do multi processing to get to 8GB
Anonymous
write a program that wll take in 9 numbers and then employ a search platform that wll search numbers frm the array. If a number has nt been found, The program wll print "Number does nt exist in array" and continue to loop otherwise there is a match the program wll print "Match found" and then terminate. ... Help guys just need a skeleton of this code. ...
Sid Sun
A kernel can and will kill your process once it sees it's not behaving appropriately. Systems crash crashes can be due to a lot of reasons but as far as I understand, it boils down to one thing, kernel panics. Somehow you will need to get the kernel to panic which will result in a cradh
Vladimir
Malloc in a loop?
Vladimir
Or just malloc (8gb) ?
Sid Sun
Thanks man ,a lot but i wanted c ++
You can figure out how to do that, you wanted a "skeleton code" anyway
Abdul
Hi C ++ generation?
Vladimir
If everyone simply got what they wanted it would be such a boring world
Vladimir
I think if you have 8 gb ram it would just return 0
Vladimir
So better malloc in a loop
Vladimir
I mean malloc (number in bytes equal to 8 gb)
Sid Sun
Vladimir
Anonymous
Angelo
lol
Wim
Welcome Angelo
Angelo
Anonymous
Is default keyword and drfault statement used in switch same?
Anonymous
What are the errors we can prevent using function prototype I couldnt get answer in google and books too so help please
Beer WRLD
What are the errors we can prevent using function prototype I couldnt get answer in google and books too so help please
don't know about errors basically is related to if your function is defined after function call then it gives error so with use of fn prototype this can be eliminated
Beer WRLD
Is default keyword and drfault statement used in switch same?
default keyword is used to give the default statement in switch
Rohan
What are the ASCII values of Up/Down/Left/Right Arrow keys???
detergentTikiya
detergentTikiya
Well yes, but most modern operating systems are designed to deal strongly with this stupidity of any program
Sid Sun
We could use an admin in the OT group admins
detergentTikiya
Still problem😕
Isn't your problem similar to finding a repeated number in consecutive n integers ?
Anonymous
Admins, wake up there is a bot spamming OT
Sai Meghana
Why have you kept 4 vectors?
Because I have to divide it into four sub arrays and find their sums later ._.
detergentTikiya
Because I have to divide it into four sub arrays and find their sums later ._.
The array could be anything .I didn't understand why are you creating 4 subarrays out of it?
detergentTikiya
negative ints in one array and positive in other..that makes 2 subarrays
detergentTikiya
on what basis are you creating 4 subarrays?
Sai Meghana
Say you make four sub arrays A,B,C,D they want them to be made such that sumA+sumC-sumB-sumD is minimum. That was the question. And A,B,C,D should have numbers in the same order as the original array.. that is if you concatenate them you get the array back
detergentTikiya
Say you make four sub arrays A,B,C,D they want them to be made such that sumA+sumC-sumB-sumD is minimum. That was the question. And A,B,C,D should have numbers in the same order as the original array.. that is if you concatenate them you get the array back
Okay..got it now. This problem doesn't talk about negative or positive ints. So I will assume sum(A+C) - Sum(B+D) will be minimum only when each integer in A and C is <= min(all integers in B,D)
detergentTikiya
Also, your logic revolves around checking numbers < or >= 0 which may not serve the purpose when all ints are positive while(array[j]<0)
Sai Meghana
True... But I was wondering why my code gives segmentation fault
Sai Meghana
Anyhow, even when all numbers are positive, the value will be maximum when subarrays B and D are empty, right?
Sai Meghana
And that is allowed
detergentTikiya
detergentTikiya
get the backtrace and see which linenumber is producing sigfault
detergentTikiya
most probably, it would be out of bounds
Vedant
Hey
Vedant
Can anyone tell me how to increase array size during runtime??
K
Is it possible?
Vedant
Using malloc.. I think it is
Vedant
But I don't know how to do it
detergentTikiya
Can anyone tell me how to increase array size during runtime??
Of course you can, what you need to know is Dynamic memory allocations in C
Vedant
Can you explain it to me??
Vedant
Or can you send me any link where it is explained in detail??
Sai Meghana
yes, but you want minimum..right?
whops, sorry, its supposed to be maximum
Sai Meghana
did you try gdb through your code?
im not sure i know what that is.. ill look it up
Vladimir
Or can you send me any link where it is explained in detail??
You can type your question to google and get a bunch of links
Vedant
I tried on a site named geekforgeeks
Vedant
But they have explained it in short
Vedant
Ok... I will try it again
Vedant
Thanks
Vedant
Tikiya
Vladimir
Most valuable skill in programming—is finding answers on the net. Master it.