ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

Questions 7&8


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

WHAT'S YOUR ENGINEERING QUOTIENT?

Test Your EQ•Homerun?

Problem 7—What can you infer about the rand() function after looking at the code and its output?

#define ITER 10000
#define SEED 0x12345678
test()
{
int i;
int counts[4]={0,0,0,0};
srand(SEED);
for (i=0; i4; i++)
{
printf("%d bin probability =
%f\n", i, counts[0]/(float)ITER;
}
}

After running the code many times with different values for
ITER and SEED, you always get the same output:

0 bin probability = 0.25000
1 bin probability = 0.25000
2 bin probability = 0.25000
3 bin probability = 0.25000

ANSWER Go


Problem 8—You work for a robotics company and, for a demo project, you are helping design a robotic skeet shooter. All that remains is developing a tracking algorithm. You are receiving a video image with sufficient frame speed to track the target. You need an algorithm to help guess where the target will be in successive video frames. What would you suggest?

ANSWER Go

8--99

Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ