professor
Sai Meghana
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. ...
Vladimir
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
Sid Sun
Vladimir
Malloc in a loop?
Vladimir
Or just malloc (8gb) ?
Anonymous
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)
Anonymous
Sid Sun
Dima
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
detergentTikiya
Given an array of n positive integers, for all i except when i= t, A[i]=i, and A[t]=t+1;find the value of t. (Not using brute force approach i.e O(n) ).
Example
Let 8 be the number of integers in an array so and let t=6 so array will be
{0,1,2,3,4,5,7,7} . Now how to find t using binary search. I am confused plz help or tell me the approach
Did you manage to solve this or still have a problem?
Rohan
What are the ASCII values of Up/Down/Left/Right Arrow keys???
detergentTikiya
detergentTikiya
detergentTikiya
detergentTikiya
detergentTikiya
Well yes, but most modern operating systems are designed to deal strongly with this stupidity of any program
Vipul
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
g
detergentTikiya
Sai Meghana
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
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
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
Vedant
Can you explain it to me??
Vedant
Or can you send me any link where it is explained in detail??
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.