Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~10K People Reached
Favorite Tags

12 Posted Topics

Member Avatar for kamalashraf

hi, below is the code for binary search in case of array is sorted in ascending order. what changes i have to do if array is sorted in descending order. #include<iostream> using namespace std; void getdata (int a[], int size); int binarysearch (int a[], int size, int key); int main() …

Member Avatar for rubberman
0
7K
Member Avatar for kamalashraf

i want to make a batch file to ping an ip. it must have 4 conditions. 1: if destination ip is reach able then it should display "host reachable" 2: if destination ip not reachable then it should display "host not reachable" 3: if request times out then it should …

Member Avatar for kamalashraf
0
277
Member Avatar for kamalashraf

hi, can someone correct this code for me. i will be very thnakful. #include<iostream> #include<string> using namespace std; template <class T> class ListIterator; template<class T> class List { friend class ListIterator<T>; //declaration of <Template>class iterator public: List(int size); ~List(){ delete [] listArray; } bool isFull() { return mSize == MaxSize; …

Member Avatar for Ancient Dragon
0
155
Member Avatar for kamalashraf

please tell me whats wrong in this code, i am getting error, help me to fix this. Course *array[10][5]; Course *array2[10][5]; while(!coursefile.eof()) { for (int i=0;i<10;i++) { for (int j=0;j<5;j++) { coursefile >> array[i][j]->getBook(); coursefile >> array2[i][j]->getSection(); } } }

Member Avatar for Moschops
0
140
Member Avatar for kamalashraf

consider this class class Course { string book; char section; public: Course (string bk, char sec) : book(bk), section (sec){} string getBook(){return book;} char getSection (){return section;} void print() { cout <<"book name is: "<<book<<endl << "section is: " << section << endl; } }; i want to make array …

Member Avatar for Ancient Dragon
0
107
Member Avatar for kamalashraf

i have 10 students, each student is associated with 5 courses and the section of course, i want to do this in array, please help regarding this. thanks. for example john book1 A book2 A book3 C book4 D book5 B marry book1 C book2 B book3 A book4 B …

Member Avatar for deceptikon
0
101
Member Avatar for kamalashraf

#include<iostream> using namespace std; void getdata (int a[], int size); int main () { int size=10; int a[size]; getdata (a[], size); return 0; } void getdata (int a[], int size) { for (int i=0; i<size; i++) cin>>a[i]; }

Member Avatar for deceptikon
0
149
Member Avatar for kamalashraf

i am getting result of average in int instead of float, tell me where i have made mistake. this is the code. #include<iostream> using namespace std; void getData (int a[], int s); int numbersSum (int a[], int s); float average (int sum, int size); int main() { int size=0; int …

Member Avatar for Ancient Dragon
0
324
Member Avatar for kamalashraf

#include<iostream> #include<fstream> using namespace std; int main() { int n=0; int sum=0; ifstream fin; fin.open("input.txt"); for (int i=0; i<4; i++) { fin >> n; sum=sum+n; } cout << "Sum of given numbers is " << sum << endl; return 0; } in the above code, i want to fetch data …

Member Avatar for triumphost
0
605
Member Avatar for kamalashraf

hi, i have written a program to find area of triangle, but i meet some errors, i can not fix this error, kindly help me to fix the error. thanks. //******area of triangle******// #include<iostream> using namespace std; float trianglearea (float a, float b, float c, float d) { float r=a*b*c*d; …

Member Avatar for tinstaafl
0
270
Member Avatar for kamalashraf
Member Avatar for Captain119
0
191
Member Avatar for kamalashraf

i am making a number base conversion program in c++, suppose that user enters an base 2 number and want to convert that number in base 4. when he enter the number (which he wants to be converted), how can i detect that number is belongs to base 2 number …

Member Avatar for Banfa
0
542

The End.