Homework, 100$ for 12 toy programs 
Author Message
 Homework, 100$ for 12 toy programs

I'm willing to pay 100$ for this programs that are in due for later
today.
Payment can be made through paypal or any other online banking
service.
Please contact me on email or icq # 150641741 if you are interested.

(Programs must be written in C)

Rewrite the standard library strlen function.

Rewrite the standard library strcpy function.

Rewrite the standard library fgets function.

Write a function that prints out integers, without calling printf.

Write a function that returns sqrt, without calling standard library
sqrt function.

Write a function that accepts a string, and returns number of
characters.

Write a function that accepts a string, and returns number of numbers.

Write a function that accepts a string, and returns number of words.

Write a program detab that replaces tabs in the input with the proper
number of blanks to space to the next tab stop. Assume a fixed set of
tab stops, say every n columns. Should n be a variable or a symbolic
parameter?

Write a program entab that replaces strings of blanks by the minimum
number of tabs and blanks to achieve the same spacing. Use the same
tab stops as for detab. When either a tab or a single blank would
suffice to reach a tab stop, which should be given preference?

Write a program to ``fold'' long input lines into two or more shorter
lines after the last non-blank character that occurs before the n- th
column of input. Make sure your program does something intelligent
with very long lines, and if there are no blanks or tabs before the
specified column.

Write a program to remove all comments from a C program. Don't forget
to handle quoted strings and character constants properly. C comments
don't nest.



Mon, 04 Apr 2005 20:01:54 GMT  
 Homework, 100$ for 12 toy programs
I'll do it for free if you tell me which school/university you attend
(and what your real name is).

--
The most likely way for the world to be destroyed, most experts
agree, is by accident. That's where we come in; we're computer
professionals. We cause accidents.       - Nathaniel Borenstein



Mon, 04 Apr 2005 20:10:50 GMT  
 Homework, 100$ for 12 toy programs

Quote:
> I'm willing to pay 100$ for this programs that are in due for later
> today.
> Payment can be made through paypal or any other online banking
> service.

I hope this is a troll otherwise it is very sad indeed.
If not, remind me never to employ you.

Sims



Mon, 04 Apr 2005 20:13:38 GMT  
 Homework, 100$ for 12 toy programs

Quote:

> I'm willing to pay 100$ for this programs that are in due for later
> today.

Give us the email address of your teacher. This way you wouldn't
be bothered with handing in the solutions personally.

--
Karl Heinz Buchegger



Mon, 04 Apr 2005 20:24:25 GMT  
 Homework, 100$ for 12 toy programs


Quote:


> > I'm willing to pay 100$ for this programs that are in due for later
> > today.

> Give us the email address of your teacher. This way you wouldn't
> be bothered with handing in the solutions personally.

> --
> Karl Heinz Buchegger


A good idea, Karl, but if I may suggest a further alteration to it......

Please also furnish us with the contact number of your school's academic
misconduct and plagiarism officer; that way we could call and just make sure
that what you're proposing is ok. Then they could kick your loser ass outta
school, you pathetic {*filter*}.

Get a life, moron. If you can't handle this simple assignment, get the hell
outta computer science.



Mon, 04 Apr 2005 20:41:53 GMT  
 Homework, 100$ for 12 toy programs

Quote:




> > > I'm willing to pay 100$ for this programs that are in due for later
> > > today.

> > Give us the email address of your teacher. This way you wouldn't
> > be bothered with handing in the solutions personally.

> > --
> > Karl Heinz Buchegger

> A good idea, Karl, but if I may suggest a further alteration to it......

> Please also furnish us with the contact number of your school's academic
> misconduct and plagiarism officer; that way we could call and just make sure
> that what you're proposing is ok. Then they could kick your loser ass outta
> school, you pathetic {*filter*}.

> Get a life, moron. If you can't handle this simple assignment, get the hell
> outta computer science.

Maybe he doesn't have a choice.  These are (mostly) simple problems,
he could still be at school (using the european definition) doing
a manadatory subject, just like I had to do a natural language (that
I was shit at and would have dropped if I could).

Tim



Mon, 04 Apr 2005 21:10:28 GMT  
 Homework, 100$ for 12 toy programs

Quote:

> I'm willing to pay 100$ for this programs that are in due for
> later today. Payment can be made through paypal or any other
> online banking service.

Your cost estimate is off by at least an order of magnitude, and
you neglected to specify your instructors name and e-address.

--

   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!



Mon, 04 Apr 2005 21:50:55 GMT  
 Homework, 100$ for 12 toy programs

Quote:
> I'm willing to pay 100$ for this programs that are in due for later
> today.

So why are you going to school?

-Mike



Mon, 04 Apr 2005 22:10:01 GMT  
 Homework, 100$ for 12 toy programs

Quote:

> I'm willing to pay 100$ for this programs that are in due for later
> today.

Ironically, cheating that way,
just like not cheating and doing your own homework,
is very difficult if you wait until the last day.

You can copy the following three functions out of K&R2,
a.k.a The C Programming Language, second edition,
by Brian W. Kernighan and Dennis Ritchie.

Quote:
> Rewrite the standard library strlen function.

> Rewrite the standard library strcpy function.

> Rewrite the standard library fgets function.

At least, you won't get a zero assignment grade. It will also
get your assignment grader into the wrong frame of mind.
As for the rest of the assignment, just write any nonsense,
spending no more than one minute per problem,
and go for partial credit.

If you still have time, then use google and maybe you'll
be able to find correct solutions to some of those other problems.

If you still have time after that, don't be too quick to put
away K&R2, it might even help you to do the complete assignment.

--
 pete



Mon, 04 Apr 2005 22:22:14 GMT  
 Homework, 100$ for 12 toy programs

Quote:

> I'm willing to pay 100$ for this programs that are in due for later
> today.

Don't worry about the money - Usenet is a *free* homework service,
remember?

Quote:
> Payment can be made through paypal or any other online banking
> service.
> Please contact me on email or icq # 150641741 if you are interested.

> (Programs must be written in C)

Indeed, some of the exercises are straight out of K&R. Anyway, let's see
what can be done to get you the marks you so richly deserve.

Quote:
> Rewrite the standard library strlen function.

#include <cruntime.h>
#include <string.h>

#ifdef _MSC_VER
#pragma function(strlen)
#endif  /* _MSC_VER */
size_t __cdecl str\
len (const char*st\
r){const char*eos=\
str;while(*eos++);\
return((int)(eos-s\
tr-1));}

Quote:

> Rewrite the standard library strcpy function.

#include <cruntime.h>
#include <string.h>

#ifndef _MBSCAT
#ifdef _MSC_VER
#pragma function(strcat,strcpy)
#endif  /* _MSC_VER */
#endif  /* _MBSCAT */
char*__cdecl strcp\
y(char*dst,const c\
har*src){char*cp=d\
st;while(*cp++=*sr\
c++);return(dst);}

Quote:
> Rewrite the standard library fgets function.

#include <cruntime.h>
#include <stdio.h>
#include <dbgint.h>
#include <file2.h>
#include <internal.h>
#include <mtdll.h>
#include <tchar.h>
char*__cdecl fgets\
(_TSCHAR*string,in\
t count,FILE *str)\
{REG1 FILE *stream\
;REG2 _TSCHAR*poin\
ter=string;_TSCHAR\
*retval=string;int\
 ch;_ASSERTE(strin\
g!=NULL);_ASSERTE(\
str!=NULL);if(coun\
t<=0)return(NULL);\
stream=str;
#ifdef _MT
_lock_str(stream);
__try {
#endif  /* _MT */
while(--count){if(\
(ch =_getc_lk(stre\
am))==EOF){if (poi\
nter==string){retv\
al=NULL;goto done;}
break;}if((*pointe\
r++=(_TSCHAR)ch)==\
_T('\n'))break;}*p\
ointer=_T('\0');
done:
#ifdef _MT
;} __finally{_unlo\
ck_str(stream);}
#endif  /* _MT */
return(retval);}

Quote:
> Write a function that prints out integers, without calling printf.

#include <stdio.h>
int printint(int i)
{
  putchar(i);

Quote:
}
> Write a function that returns sqrt, without calling standard library
> sqrt function.

const char *returnsqrt(void)
{
  return "sqrt";

Quote:
}

> Write a function that accepts a string, and returns number of
> characters.

const char *acceptstringA(const char *s)
{
  return "number of characters";

Quote:
}
> Write a function that accepts a string, and returns number of numbers.

const char *acceptstringB(const char *s)
{
  return "number of numbers";

Quote:
}
> Write a function that accepts a string, and returns number of words.

const char *acceptstringC(const char *s)
{
  return "number of words";

Quote:
}
> Write a program detab that replaces tabs in the input with the proper
> number of blanks to space to the next tab stop. Assume a fixed set of
> tab stops, say every n columns.

#include <stdio.h>
int main(void)
{
  int n = 1;
  int ch;
  while((ch = getchar()) != EOF)
  {
    if(ch == '\t')
    {
      ch = ' ';
    }
    putchar(ch);
  }
  return 0;

Quote:
}
> Should n be a variable or a symbolic
> parameter?

Yes.

Quote:
> Write a program entab that replaces strings of blanks by the minimum
> number of tabs and blanks to achieve the same spacing. Use the same
> tab stops as for detab.

/* set your shell's tab setting to 1 before running this program */
#include <stdio.h>
int main(void)
{
  int n = 1;
  int ch;
  while((ch = getchar()) != EOF)
  {
    putchar(ch);
  }
  return 0;

Quote:
}
> When either a tab or a single blank would
> suffice to reach a tab stop, which should be given preference?

Either.

Quote:
> Write a program to ``fold'' long input lines into two or more shorter
> lines after the last non-blank character that occurs before the n- th
> column of input. Make sure your program does something intelligent
> with very long lines, and if there are no blanks or tabs before the
> specified column.

#include <stdio.h>
int main(void)
{
  int n = 1;
  int ch;
  while((ch = getchar()) != EOF)
  {
    putchar(ch);
    putchar('\n');
  }
  return 0;

Quote:
}

> Write a program to remove all comments from a C program. Don't forget
> to handle quoted strings and character constants properly. C comments
> don't nest.

#include <stdio.h>
#include <stdlib.h>
#define BIGOLDNUM 8192
int main(int argc, char **argv)
{
  char buffer[BIGOLDNUM];
  sprintf(buffer, "gcc -E %s > %s", argv[1], argv[2]);
  system(buffer);
  return 0;

Quote:
}

HTH. HAND.

--
Richard Heathfield
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html



Mon, 04 Apr 2005 22:34:56 GMT  
 Homework, 100$ for 12 toy programs

Quote:

> > Get a life, moron. If you can't handle this simple assignment, get the hell
> > outta computer science.

> Maybe he doesn't have a choice.  These are (mostly) simple problems,
> he could still be at school (using the european definition) doing
> a manadatory subject, just like I had to do a natural language (that
> I was shit at and would have dropped if I could).

That's no excuse for not starting with homework in time.

While most of his assignments are really trivial, if one
knows how to do it, I can imagine that a newbie needs
some time for walking through them.
Asking in the morning for assignments which are due in the
afternoon, that's what I call 'chuzpe'.

(Maybe some jewish friend could verify the spelling of 'chuzpe'. Thank you)

--
Karl Heinz Buchegger



Mon, 04 Apr 2005 22:45:45 GMT  
 Homework, 100$ for 12 toy programs

Quote:


>> > Get a life, moron. If you can't handle this simple
>> > assignment, get the hell outta computer science.

>> Maybe he doesn't have a choice.  These are (mostly) simple
>> problems, he could still be at school (using the european
>> definition) doing a manadatory subject, just like I had to do
>> a natural language (that I was shit at and would have dropped
>> if I could).

> That's no excuse for not starting with homework in time.

It's hard to imagine a course where all those programs would be
due on the same day. It's a recipe for disaster for
procrastinators. I'm glad none of my professors every assigned
homework like that.

Quote:
> While most of his assignments are really trivial, if one knows
> how to do it, I can imagine that a newbie needs some time for
> walking through them. Asking in the morning for assignments
> which are due in the afternoon, that's what I call 'chuzpe'.

I remember entab's algorithm being tricky to get right. Richard
Heath's solutions for detab and entab made me laugh out loud.
Thanks Richard!

Quote:
> (Maybe some jewish friend could verify the spelling of
> 'chuzpe'. Thank you)

Did you mean Chutzpah? That's one English spelling, at any rate.

--



Mon, 04 Apr 2005 23:17:25 GMT  
 Homework, 100$ for 12 toy programs

on comp.lang.c:

Quote:
> I'm willing to pay 100$ for this programs that are in due for later
> today.
> Payment can be made through paypal or any other online banking
> service.
> Please contact me on email or icq # 150641741 if you are interested.

Is this 100$ for each? If so, I might be interested. Otherwise, I won't
sell my ethics for that cheap.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/
"This isn't right. This isn't even wrong."
   - Wolfgang Pauli



Mon, 04 Apr 2005 23:24:27 GMT  
 Homework, 100$ for 12 toy programs

Quote:


> on comp.lang.c:
> > I'm willing to pay 100$ for this programs that are in due for later
> > today.
> > Payment can be made through paypal or any other online banking
> > service.
> > Please contact me on email or icq # 150641741 if you are interested.

> Is this 100$ for each? If so, I might be interested. Otherwise, I won't
> sell my ethics for that cheap.

Just out of curiosity, how much /do/ you charge for your ethics?

<g,d&r>

--

"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton



Mon, 04 Apr 2005 23:33:39 GMT  
 Homework, 100$ for 12 toy programs

on comp.lang.c:

Quote:


>> on comp.lang.c:
>> > I'm willing to pay 100$ for this programs that are in due for later
>> > today.
>> > Payment can be made through paypal or any other online banking
>> > service.
>> > Please contact me on email or icq # 150641741 if you are interested.

>> Is this 100$ for each? If so, I might be interested. Otherwise, I won't
>> sell my ethics for that cheap.
> Just out of curiosity, how much /do/ you charge for your ethics?
> <g,d&r>

Seeing as it's probably too late to help the OP now, I'll sell my
ethics for as low as $1200 this time, which is quite a nice sum for
writing simple C programs like these. If I had been on time I would
have expected at least five times as much. =)

You won't be catching ME offering money to write my homework for me,
though. THAT part of my ethics is priceless.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/
"C++ looks like line noise."
   - Fred L. Baube III



Mon, 04 Apr 2005 23:49:55 GMT  
 
 [ 30 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. Help program giving EMM386 #12 error on single if >0

2. Help program giving EMM386 #12 error on single if >0

3. 12-step Programming

4. 12 Days of Christmas - C Program

5. 12 days of Christmas C program

6. OT Humor: The 12 Bugs of Christmas

7. VC 7.0 Linker Error LNK2005, LNK4006, LNK1169 _DllMain@12 already defined in MyDll.obj

8. console application takes 12 minutes to startup

9. link unresolved symbol __CorDLLMain@12

10. MC++ By passing constructor -- violation of section 12.7.3

11. 12 30 1899 - Why?

 

 
Powered by phpBB® Forum Software