Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 20th, 2003, 06:45 PM
mvitic mvitic is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 mvitic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
please help beginner to get the job...

Hi,

After I finished college, I didn't use C++. After 3 years of graphic design experience, I applied for an entry level C++ position and I received the questionnaire below. They said, I can use any reference book or ask to a senior person. Please help, I am trying to refresh my memory and I need this job...

-----QUESTION--------
LINE Contains Question
50 char * p;
200 p=test();
201-300 /* we want to use ‘p’ here*/
2000 char * test()
2001 {
2002 char buf[8];
2003-2050 /* unspecified, buf defined here *./
2051 return (char *) buf;
2052 }

1. Is this a reasonable function?

2. Will it work at all?

3. Is it good practice, and why?

4. How, exactly, could one get a second ‘char *’ to use back from this function? Be specific in terms of the exact syntax needed. Another way to state this question is how can this function be modified to return a ‘char *’ from the function, and an additional ‘char *’ value in one function call. Please make sure that your answer will work even if the size of the char * desired is not known in the outside calling function. Avoid C++ syntax. Include statements in called and calling functions. Use good programming practice. Although alternatives are acceptable, for this question, please include an answer which maintains the original return type.

5.What might go between the parentheses in this particular situation in LINE 2000?

6. What is the construction ‘(char *)’ called and what does it do? What do the constructions of that name do in general in line 2051?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > please help beginner to get the job...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT