Forum: C++ Sep 25th, 2007 |
| Replies: 3 Views: 705 Stack Abstract Data Type Question Sorry~~, I don't know where to post this quetion.
Can someboy help me with this question, plz....
Suppose someone designed a stack abstract data type in which the top function returned an access... |
Forum: Assembly Dec 6th, 2006 |
| Replies: 5 Views: 3,226 need help on pep/8 machine language program sorry, i don't know which forum i should post this question.
Q) a machine language program to input 2 numbers then adds 2 numbers then output the single-character result.
this is what i got so far... |
Forum: C Oct 27th, 2006 |
| Replies: 8 Views: 1,823 |
Forum: C Oct 26th, 2006 |
| Replies: 8 Views: 1,823 |
Forum: C Oct 26th, 2006 |
| Replies: 8 Views: 1,823 Adding two binary numbers and find over flow bits #include <stdio.h>
#include <iomanip>
int main()
{
int binary1[8] = {0,1,1,1,1,0,1,1}; //8 element array
int binary2[8] = {1,0,1,0,1,1,1,1}; //8 element array
int binarySum[9]; |
Forum: C Mar 30th, 2006 |
| Replies: 4 Views: 1,449 |
Forum: C Mar 30th, 2006 |
| Replies: 4 Views: 1,449 partition algorithm question Trace the Partition function on the following array:
[0] [1] [2] [3] [4] [5] [6]
'F' 'K' 'A' 'R' 'C' 'Y' 'G'
Assume that ChoosePivot returns without doing anything (the purpose... |
Forum: C Mar 29th, 2006 |
| Replies: 5 Views: 1,343 |
Forum: C Mar 29th, 2006 |
| Replies: 5 Views: 1,343 hw assignment help on selection & merge sort It's from my homework assignment
Question 1)
Based on the O notation, approximately how many swaps and comparisons occur when Selection sort is called on a worst-case array of length 8?
a) 16
b)... |
Forum: C++ Mar 25th, 2006 |
| Replies: 3 Views: 1,287 O-notation What is the O-notation for the following code?
cin >> N;
for (int count = 1; count <= N; count++)
{
for (int count2 = 1; count2 <= count; count2++)
} |
Forum: C++ Mar 24th, 2006 |
| Replies: 11 Views: 2,796 |
Forum: C++ Mar 24th, 2006 |
| Replies: 11 Views: 2,796 Re: homework question on class...multiple choice if you look at my original question, i stated that "The Base class has a public member function mem() that is not virtural. The member function mem() is redefined in class Derived."
the base class... |
Forum: C++ Mar 24th, 2006 |
| Replies: 11 Views: 2,796 Re: homework question on class...multiple choice no, i don't think i made any mis typo on the second question...i double checked with my homework sheet...maybe the professor made a mistake.
Base *dPtr = new Derived;
dPtr -> mem();
In the second... |
Forum: C Mar 24th, 2006 |
| Replies: 1 Views: 704 |
Forum: C++ Mar 24th, 2006 |
| Replies: 11 Views: 2,796 Re: homework question on class...multiple choice oops~ sorry.
i made a typo on the first question....is that mean the answer is "C"
c) typedef ourClass* ourClassPtrType;
ourClassPtrType ourClassPtr;
ourClassPtr = new ourClass;
d) typedef... |
Forum: C++ Mar 23rd, 2006 |
| Replies: 11 Views: 2,796 homework question on class...multiple choice I have no clue what the answer is.
Which of the following dynamically allocates an object of type ourClass?
a) ourClass ourPtr;
ourPtr = new ourClass;
b) ourClass ourClassObj = new... |
Forum: C Mar 22nd, 2006 |
| Replies: 3 Views: 803 |
Forum: Computer Science and Software Design Feb 24th, 2006 |
| Replies: 2 Views: 7,239 Argorithm: palindromes, write recursive function. Consider the language in the alphabet {a,b} defined by the grammar.
<S> = a<S>a | b<S>b | a | b
Question: List all the 5-character strings that are in this language.
My answer is there are eight... |
Forum: C Feb 24th, 2006 |
| Replies: 2 Views: 1,233 Re: Algorithm: BNF question That's what I got too....the fourth one is "-.." which already exist so it doens't count.
I have another question and this one is little harder.
<S> = a<S>a | b<S>b | a | b
Q: list all the... |
Forum: C Feb 23rd, 2006 |
| Replies: 2 Views: 1,233 Algorithm: BNF question How do i get from 2 character words to 4 character words or 5 character words??
can anyone show me how to do that plz...
Q) Consider a language of words, where each word is a string of dots and... |
Forum: C Feb 14th, 2006 |
| Replies: 2 Views: 1,300 |
Forum: C Feb 14th, 2006 |
| Replies: 2 Views: 1,300 Pointer arithmetic homework question This is one of my hw question and I can't find the answer from the textbook.
Question: A function that modifies an array by pointer arithmetic (e.g., ++ptr) to process every value should have a... |
Forum: C++ Nov 15th, 2005 |
| Replies: 4 Views: 2,080 |
Forum: C++ Nov 8th, 2005 |
| Replies: 2 Views: 1,103 |
Forum: C++ Nov 8th, 2005 |
| Replies: 2 Views: 1,103 Can anybody tell what's wrong with this code? can't find where the error occurs using debugger? any help plz~~
//this program computes how much money will
//accumulate after so many years of investing
#include <iostream>
using namespace... |
Forum: C Nov 8th, 2005 |
| Replies: 2 Views: 1,091 |
Forum: C Nov 8th, 2005 |
| Replies: 2 Views: 1,091 |