Programming Skills Test

Copy and paste the test questions below into a text file, then email your completed test with the text file attached to ucsim@uc.edu.  The test should take approximately 60 – 90 minutes to complete.  Questions?  Email us at ucsim@uc.edu

1. What is an if statement?

2. How is a while statement different from an if statement?

3. How is a while statement different from a for statement?

4. What is the difference between an Array and a Linked List?

5. Give an example of when you would use an Array instead of a Linked List.

6. Give an example of when you would use a Linked List instead of an Array.

7. What are “memory leaks” and how would you avoid them in C++ AND C# languages?

8. Code Example 1

static void ShuffleCards(int CardsArray[52])
{
       // Implement this functon using C++ to shuffle the CardsArray in place.
}

9. Code Example 2

void PrintAsterisks(int NumOfLines)
{
       // Implement this function in C++ to print to the console using cout stream object
       // It takes an integer (NumOfLines) that can't be less than 1 and prints lines containing Asterisks
       // where the first line would have 1 Asterisk, second would be 2 and so on.
 
}

10. Code Example 3

static Bitmap DrawBitmapSquare(int EdgeLength)
{
       // Implement this method using C# and GDI+ library and the "Bitmap" class
       // to return a newly created bitmap image (sized EdgeLength X EdgeLength)that is all black colored except for the 2 diagonals they should be in white color
       // you can use the "SetPixel()" method found in the Bitmap class
}