C PROGRAMMER TEST...CAN YOU CODE THIS?? 
Author Message
 C PROGRAMMER TEST...CAN YOU CODE THIS??

C PROGRAMMER TEST

1.   Create  a text file named "parse.dat" containing the following
lines:

                  lookup_rec("db_test",bo_test,11)
                  dial("95551212")
                  printxy(10,3,0,15,GREY,"testing")

2.  Your task is too:

      a)  Open the above file, reading in one line at a time.
      b)  Display the lene before parsing.
      c)  Parse the line into the format as described below.
      d)  Pause waiting for the enter key to bring in the next line of
          the file.
      e)  Repeat the process until youve parsed each line in the file.

Each line is a command followed by a parenthesized comma-delimited
parameter list.

Each parameter has a type, Types are defined as: String, Variable or
Numeric.

For example, the output for line 1 should look like the following:

                       lookup_rec("db_test",bo_test,11)

                       Command:       lookup_rec
                       Parameter1:     db_test         Type:  String
                       Parameter2:     bo_test         Type:  Variable
                       Parameter3:     11              Type:   Numeric

3.  Include comments to define limitations or assumptions.

4.  Any errors encountered should be displayed. Provide as much error
    checking as
    needed. Your program should not core-dump or lock up no matter what  
    the data
    is that you are given.

5.  Your program should be able to handle other text files with data in
    this format to
    produce the required output.

6.  Use standard ANSI C constructions and functions except for one: You  
    are not allowed to use strok...that would be cheating

         I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
         CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??



Wed, 05 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??



Quote:
> C PROGRAMMER TEST

> 1.   Create  a text file named "parse.dat" containing the following
> lines:

>                   lookup_rec("db_test",bo_test,11)
>                   dial("95551212")
>                   printxy(10,3,0,15,GREY,"testing")

> 2.  Your task is too:

>       a)  Open the above file, reading in one line at a time.
>       b)  Display the lene before parsing.
>       c)  Parse the line into the format as described below.
>       d)  Pause waiting for the enter key to bring in the next line of
>           the file.
>       e)  Repeat the process until youve parsed each line in the file.

> Each line is a command followed by a parenthesized comma-delimited
> parameter list.

> Each parameter has a type, Types are defined as: String, Variable or
> Numeric.

> For example, the output for line 1 should look like the following:

>                        lookup_rec("db_test",bo_test,11)

>                        Command:       lookup_rec
>                        Parameter1:     db_test         Type:  String
>                        Parameter2:     bo_test         Type:  Variable
>                        Parameter3:     11              Type:   Numeric

> 3.  Include comments to define limitations or assumptions.

> 4.  Any errors encountered should be displayed. Provide as much error
>     checking as
>     needed. Your program should not core-dump or lock up no matter what  
>     the data
>     is that you are given.

> 5.  Your program should be able to handle other text files with data in
>     this format to
>     produce the required output.

> 6.  Use standard ANSI C constructions and functions except for one: You  
>     are not allowed to use strok...that would be cheating

>          I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
>          CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??

First... I was... I already did my homework.

Regards
Brian



Wed, 05 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??


Quote:
> 6.  Use standard ANSI C constructions and functions except for one: You  
>     are not allowed to use strok...that would be cheating
>          I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
>          CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??

Not me, I guess; I don't even know what strok is, let alone how to
(mis)use it... perhaps you could start with a string tokenizing function?

Subtle, you ain't.

        -- AK

--



Wed, 05 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:

>C PROGRAMMER TEST
>         I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
>         CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??

I hope YOU will be the first.  That would at least mean you did
your own homework.  You must be getting pretty desparate already,
seeing you posted the message THREE times.

J.



Thu, 06 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:

> C PROGRAMMER TEST

> 1.   Create  a text file named "parse.dat" containing the following
> lines:

>                   lookup_rec("db_test",bo_test,11)
>                   dial("95551212")
>                   printxy(10,3,0,15,GREY,"testing")

> 2.  Your task is too:

>       a)  Open the above file, reading in one line at a time.
>       b)  Display the lene before parsing.
>       c)  Parse the line into the format as described below.
>       d)  Pause waiting for the enter key to bring in the next line of
>           the file.
>       e)  Repeat the process until youve parsed each line in the file.


I am not interested in doing your homework for you. Please give it a
honest try and if you get stuck with specific C programming problems,
you might consider posting a minimal working sample of your code
that reproduces the error or problem.

Stephan
(initiator of the campaign against grumpiness in c.l.c)



Thu, 06 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??


scribbled :

Quote:
>C PROGRAMMER TEST

>1.   Create  a text file named "parse.dat" containing the following
>lines:

>                  lookup_rec("db_test",bo_test,11)
>                  dial("95551212")
>                  printxy(10,3,0,15,GREY,"testing")

>2.  Your task is too:

>      a)  Open the above file, reading in one line at a time.
>      b)  Display the lene before parsing.
>      c)  Parse the line into the format as described below.
>      d)  Pause waiting for the enter key to bring in the next line of
>          the file.
>      e)  Repeat the process until youve parsed each line in the file.

>         I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
>         CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??

You, I hope.

There's no such thing as CORRECT SOURCE CODE - you can write your type
of program several different ways, to get the same result.

I don't think people are understanding this, so here is how it should
have come out :

1. Create a text file called "homework.dat" containing :

if (homework != done)
post_it_to_comp-lang-c();
hand_in();

2. Your task is to :

a) Kill file this idiot
b) Mail his lecturer a copy of the post (heh..)
c) Take other appropriate action

I have written a version of this. I linked it to a COM file and ran
CRYPTCOM on it. It's on its way. Hope you enjoy disassembling it!

--
Revised anti-spam in use : remove X to reply -
'Xnetbook' becomes 'netbook'

Anti-spam thermonuclear warheads cheap at only $300!



Sat, 08 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Getting desparate for someone to do your homework.  How many times are
you going to post this?

: C PROGRAMMER TEST

: 1.   Create  a text file named "parse.dat" containing the following
: lines:

:                   lookup_rec("db_test",bo_test,11)
:                   dial("95551212")
:                   printxy(10,3,0,15,GREY,"testing")

: 2.  Your task is too:

Do your own hoemwork is YOUR task!

[snip]

:          I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
:          CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??

You mean after you handed it in, and got your marks for it?

--

    No, I am not going to explain it.  If you can't figure it out, you
    didn't want to know anyway...  -- Larry Wall, 1991



Sat, 08 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:

> C PROGRAMMER TEST

> < SOMETHING NOT TOO DISSIMILAR TO AN ASSIGNMENT SNIPPED>

On my first venture into this newsgroup I could not believe that someone
actually posted this load of old b******s. Still I have seen similar
elsewhere so I guess I should be used to it.

Anyway I look forward to seeing your follow up post to this in a few
weeks ( or should that be years ) announcing the winner and displaying
his/her amazing solution.

Simon

PS: Can you send a copy of the boy/girl/toddler 's answer who sits next
to you at school/creche.....not that I have a suspicious mind, I just
want to test my 'is this an unsubtle copy' script.



Mon, 10 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:


> > 6.  Use standard ANSI C constructions and functions except for one: You
> >     are not allowed to use strok...that would be cheating

> Not me, I guess; I don't even know what strok is, let alone how to
> (mis)use it... perhaps you could start with a string tokenizing function?

It's *very* probably a type and was meant to read "stork()" which is
a recent addition to the ANSI-C standard intended for signalling the
very same.

Stephan
(initiator of the campaign against grumpiness in c.l.c)



Mon, 10 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:

> C PROGRAMMER TEST

>  ...(homework request deleted)...

Maybe we should start posting incorrect code for these requests.

--



Mon, 10 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:

> =
> C PROGRAMMER TEST
> =
> 1.   Create  a text file named "parse.dat" containing the following
> lines:
> =
>                   lookup_rec("db_test",bo_test,11)
>                   dial("95551212")
>                   printxy(10,3,0,15,GREY,"testing")
> =
> 2.  Your task is too:
> =
>       a)  Open the above file, reading in one line at a time.
>       b)  Display the lene before parsing.
>       c)  Parse the line into the format as described below.
>       d)  Pause waiting for the enter key to bring in the next line of
>           the file.
>       e)  Repeat the process until you=92ve parsed each line in the fil=
e.
> =
> Each line is a command followed by a parenthesized comma-delimited
> parameter list.
> =
> Each parameter has a type, Types are defined as: String, Variable or
> Numeric.
> =
> For example, the output for line 1 should look like the following:
> =
>                        lookup_rec("db_test",bo_test,11)
> =
>                        Command:       lookup_rec
>                        Parameter1:     db_test         Type:  String
>                        Parameter2:     bo_test         Type:  Variable
>                        Parameter3:     11              Type:   Numeric
> =
> 3.  Include comments to define limitations or assumptions.
> =
> 4.  Any errors encountered should be displayed. Provide as much error
>     checking as
>     needed. Your program should not core-dump or lock up no matter what=
>     the data
>     is that you are given.
> =
> 5.  Your program should be able to handle other text files with data in=
>     this format to
>     produce the required output.
> =
> 6.  Use standard ANSI C constructions and functions except for one: You=
>     are not allowed to use strok...that would be cheating
> =
>          I WILL FOLLOW UP WITH THE CORRECT PROGRAM SOURCE
>          CODE IN A COUPLE DAYS.......WHO WILL BE THE FIRST??

1. man yacc
2. man lex
3. do coursework
4. end

Nick Gorham



Mon, 10 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

[ snip ]

|> > Not me, I guess; I don't even know what strok is, let alone how to
|> > (mis)use it... perhaps you could start with a string tokenizing function?
|>
|> It's *very* probably a type and was meant to read "stork()" which is
|> a recent addition to the ANSI-C standard intended for signalling the
|> very same.

Nonsense.  stork() is a POSIX extension which facilitates the delivery
of child processes.

Regards :-)

--
Chris Engebretson --- Hughes STX Corporation | Ph#: (605)594-6829
USGS EROS Data Center, Sioux Falls, SD 57198 | Fax: (605)594-6490
Landsat 7 IAS Engineering Team -- http://ltpwww.gsfc.nasa.gov/IAS

Opinions here are not those of Hughes Aircraft, STX, or the USGS.



Mon, 10 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??


#
# |> > Not me, I guess; I don't even know what strok is, let alone how to
# |> > (mis)use it... perhaps you could start with a string tokenizing function?
# |>
# |> It's *very* probably a type and was meant to read "stork()" which is
                            ^^^^
Blimey, why can't people spell 'typo'? :-)

# |> a recent addition to the ANSI-C standard intended for signalling the
# |> very same.
#
# Nonsense.  stork() is a POSIX extension which facilitates the delivery
# of child processes.
#
# Regards :-)

...which you may terminate with a ISO blessed abort()?

Oh no, please, please!, pleaaaase! No discussion about pro choice
vs pro life in this newsgroup. A thousand smileys to everyone and
then some. Please bear with a sick mind like mine. Apologies again.

        Jens
--
Jens Schweikhardt  http://www.uni-stuttgart.de/People/schweikhardt/home.html
SIGABRT -- too many storks (core dumped)



Mon, 10 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:

>Maybe we should start posting incorrect code for these requests.

Isn't that the _default_?

--

``Not only is UNIX dead, it's starting to smell really bad.'' -- rob



Tue, 11 Jan 2000 03:00:00 GMT  
 C PROGRAMMER TEST...CAN YOU CODE THIS??

Quote:



> #
> # |> > Not me, I guess; I don't even know what strok is, let alone how to
> # |> > (mis)use it... perhaps you could start with a string tokenizing function?
> # |>
> # |> It's *very* probably a type and was meant to read "stork()" which is
> # |> a recent addition to the ANSI-C standard intended for signalling the
> # |> very same.
> #
> # Nonsense.  stork() is a POSIX extension which facilitates the delivery
> # of child processes.
> #
> # Regards :-)

> ...which you may terminate with a ISO blessed abort()?

> Oh no, please, please!, pleaaaase! No discussion about pro choice
> vs pro life in this newsgroup. A thousand smileys to everyone and
> then some. Please bear with a sick mind like mine. Apologies again.

>         Jens
> --

No need to worry about a pro-choice/pro-life discussion.

Back when stork() was used for delivery (I think this was during
the Eisenhower administration), {*filter*}s
were not performed [at least not legally in US].

You probably had to issue

kill command for the stork process, ie.

ps -ef | grep stork | kill -9

Is it Friday afternoon ?



Tue, 11 Jan 2000 03:00:00 GMT  
 
 [ 24 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Non-CS major C programmers

2. Newbie: separate big .cs file into small .cs files

3. Include code in other Cs files

4. newbe/cs student, need help w/ code

5. Compile CS source code using ICodeCompiler

6. cs source code

7. test test test test

8. Need help of C(/C++) programmer: for porting a tiny Java benchmark test to C(/C++)

9. Samples to test C programmer proficience

10. C PROGRAMMER TEST

11. Test for good C programmers.

12. How to test a programmer

 

 
Powered by phpBB® Forum Software