TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shah
NA
42
0
Variable declaration problem
Mar 22 2007 10:35 AM
I am working on QuickSort Console Application as i made quicksort function public static void Main(string[] args) { **************************************** int[] arr; int hi, lo = 0; getArray(arr); Sort(lo, hi,arr); //The problem lies here it is giving error on variable "hi" as how to determine its the last number in array *********************************** } public static void getArray(int [] arr) { try { int i; for (i = 0; i <= arr.Length; i++) { Console.WriteLine("Enter the numbers to sort:" +arr[i]); } } catch(Exception e) { Console.WriteLine("{0} Exception caught.", e); } displayArr(arr); } public static void displayArr(int [] arr) { for (int i = 0; i <= arr.Length; i++) { Console.Write("Sorted:" +arr[i]); } } // Please help me in this. Thanks,
Reply
Answers (
5
)
Using a browser to display report from windows application (Offline)
Removing duplicate items from a listbox