A String[^] is not a value type, so it does not go on the stack. You really need to go and study some reference guides. Asking questions here is not a good way to learn the internal structure or implementation of a programming language.
Did you actually read the explanation that OriginalGriff posted, or the previous message that I wrote? A string is not a value type so its data will be stored on the heap. Its reference pointer s will be on the stack. If you want a simple explanation then read Charles Petzold's excellent .NET Book Zero[^].
people are saying that data reader fetch data in chunk and store in network buffer and display from there. when all data read completed from buffer then again database round trip occur. that why people say data reader is efficient for data reading purpose because it minimize the db round trip but still many things are not clear to me
suppose i issue a sql query like Select empid,Name from employee table there are 10,000 rows then what will happen. how much data sql server will send to client?
suppose network buffer could store 8kb data then sql server may send more than 8kb data or sql server know the client pc network buffer size in advance?
suppose first 100 data is stored in network buffer so when again db trip will occur for next 100 data then same query will executed so how sql server will know that that time sql server has to send data from 101 to 200 etc?
i like to know the above internal process in details regarding interaction between sql server and data reader. so please share the know if some one knows it in details.
one bit different question. how we can determine each row size in byte or kb programmatically by c#. if possible give me direction with sample code. thanks
I wouldn't trust stackoverflow for accurate details like that. Though I don't know either, and it's not something I think the average developer really needs to know about.
Bear in mind also that each ADO.net Provider may implement different strategies to improve performance.
Dears i want to design a project in c#. i need a class library in c# who read sms from gsm modem and auto respond to that sms, auto reply sms and sms sender want to apply for leave in his company. my system read sms and apply for leave to already designed database in oracle.
please guide me with example and some comand strings for sending sms
say i hard many people like started in interview face question liketo find out palindrome word writing program. so is there any web site which show basic question asked for various algo during interview.
i like similar question like palindrome word or number which many people learn during programming with c and c++ for developing logic sense.
anyone can redirect me to those web site fromwhere i can acquire many also like palindrome which people learn during programming and also asked during interview. thanks
Sorry probably i could not explain properly. i search Google but may be could put right keyword so i am not getting a web site which help peole to learn programming by c,c++ or c# with many logical program like Fibonacci series or palindrome word or number and various kind of sorting etc.
so if anyone know about any web site from where we can see many program is there for learning purpose then please share the url. thanks
Interviewers can ask the candidate to do anything (within reason, it will be related to the job function in some way) so there is no "set of algorithms" that interviewers have to pick from.
It's not to check if you remember algorithms, to to find out how you think - when you don;t have Google to do it for you!
What the interviewer is looking for is to see how well you handle simple problems (and palindromes are indeed a very simple problem) to see if the way you think fits in to how his company works. Memorizing algorithms won't help you there because the chances are the task will be unrelated to any particular algorithm, but how you implement the things do you know.
So relax, be confident, and think about the task they set - rather than trying to use the thinking of others to get you a job! (Because if you rely on others to pass the interview, you won't last long once in the job - everyone can spot the "dead wood" who can't actually do the work)
You'll be fine!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Sorry probably i could not explain properly. i search Google but may be could not put right keyword so i am not getting a web site which help peole to learn programming by c,c++ or c# with many logical program like Fibonacci series or palindrome word or number and various kind of sorting etc.
so if anyone know about any web site fromwhere we can see many program is there for learning purpose then please share the url. thanks
Don't focus on tasks: instead learn by doing. Get a book, or a course and do the exercises - they introduce the concepts in a logical sequence, and (hopefully) mean that you understand fully what you are doing before moving on to the next subject.
Trying to find existing programs doesn't help at all in that: you don't learn as much (or as well) by "looking" as you do by "doing".
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
What the interviewer is looking for is to see how well you handle simple problems (and palindromes are indeed a very simple problem) to see if the way you think fits in to how his company works.
To be fair and clear that is what the interviewer thinks that they are doing.
Statistically most of the time such skill tests would work just as well if they handed the interviewee a bag of Legos and ask them to build a car.
A random array of elements is given. Your program needs to find all the sections(sequences) in the array that are in ascending order, find the sum of those sequences, then find the largest sum and print the largest sum along with the sequence of numbers. For example if the array is like
4, 5, 6, 2, 1, 2, 3, 4, 12, 6, 4, 2, 1, 5, 8, 9
Then ascending sequences in the given array are
· 4,5,6 with sum 15
· 1,2,3,4,12 with sum 22
· 1,5,8,9 with sum 23
So your program should print the sequence 1 5 8 9 and the sum 23, as it’s the largest sum of ascending sequences.
Sure, I'll help you. The key to solving this issue is to break it down into logical chunks from your requirements.
1. Find all ascending order sequences.
2. For each result from step 1, sum the values
3. Identify the largest out of step 2.
So, you see that you have three logical areas. You know that you have an array and that you start at element 0, so all you need to do to complete step 1 is to check to see if the next value is 1 greater than the current value or if you have reached the end of the list. Store your value in an appropriate data structure and move onto the next. Once you have completed this stage, proceed to break the other stages down into a logical set of steps and solve.