User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 402,769 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,651 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 27 of 27
Search took 0.01 seconds.
Posts Made By: jack223
Forum: C++ Sep 25th, 2007
Replies: 3
Views: 705
Posted By jack223
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
Posted By jack223
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
Posted By jack223
Re: Adding two binary numbers and find over flow bits

thanks guys for all your help~
I love this website....
Forum: C Oct 26th, 2006
Replies: 8
Views: 1,823
Posted By jack223
Re: Adding two binary numbers and find over flow bits

ok...i did change it to "binarySum[8]".

and if i also change
for (i=0; i<8; i++) overflow[i] = 0;
for (i=8; i >= 0; i--)
{
binarySum[i] = binary1[i] + binary2[i] + overflow[i];
if (...
Forum: C Oct 26th, 2006
Replies: 8
Views: 1,823
Posted By jack223
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
Posted By jack223
Re: partition algorithm question

i guess using the quick sort partition function.
Forum: C Mar 30th, 2006
Replies: 4
Views: 1,449
Posted By jack223
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
Posted By jack223
Re: hw assignment help on selection & merge sort

hmm...i'm still confused!!
so the answer for the first question is "64"??
and the answer for the 2nd question is "24" or "16"?
i hate taking on-line classes....
Forum: C Mar 29th, 2006
Replies: 5
Views: 1,343
Posted By jack223
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
Posted By jack223
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
Posted By jack223
Re: homework question on class...multiple choice

Thanks for your help Narue...you have a great weekend.
thanks again.
Forum: C++ Mar 24th, 2006
Replies: 11
Views: 2,796
Posted By jack223
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
Posted By jack223
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
Posted By jack223
I have another homework question that i'm not sure what the answer is.

The class Chevrolet inherits from the class Automobile. Both have implemented a function called DownShift(). Suppose carPtr is declared as: Automobile *carPtr;
The carPtr object can point to both...
Forum: C++ Mar 24th, 2006
Replies: 11
Views: 2,796
Posted By jack223
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
Posted By jack223
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
Posted By jack223
How many public methods does class D have?

Class B
{
public:
int e();
void f();
private:
int x;
};

class D: public B
Forum: Computer Science and Software Design Feb 24th, 2006
Replies: 2
Views: 7,239
Posted By jack223
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
Posted By jack223
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
Posted By jack223
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
Posted By jack223
Forum: C Feb 14th, 2006
Replies: 2
Views: 1,300
Posted By jack223
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
Posted By jack223
counts how many times the number 5 appears in array?

Question: counts how many times the number 5 appears in array called NumArray?
Can anybody help me with this problem??
I got 4 "5s" but i don't know if i understood the question correctly or...
Forum: C++ Nov 8th, 2005
Replies: 2
Views: 1,103
Posted By jack223
Forum: C++ Nov 8th, 2005
Replies: 2
Views: 1,103
Posted By jack223
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
Posted By jack223
Forum: C Nov 8th, 2005
Replies: 2
Views: 1,091
Posted By jack223
How many member functions in Thing class?

class Thing {

public:
int Item;
Thing (int Value);
Thing (int Value1, int Value2);
int GetValue1 () const;
int GetValue2 () const;

private:
Showing results 1 to 27 of 27

 
All times are GMT -4. The time now is 9:06 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC