Sample Placement Exams for Placement into CSCI-UA.0101

Sample Placement Exam to Placement out of CSCI-UA.4

Topics Covered by the Java Placement Exam

The Java version of the placement exam covers the following topics

  • Variables: types int and float
  • The arithmetic operators +, -, *, /
  • The relational operators <, <=, >, >= and ==
  • The boolean operators && and ||
  • Assignment statements and increment operators (e.g. x++)
  • The if-else statements, including nested if-else statements
  • The for loop, including nested for loops

The Java version of the placement exam does NOT cover

  • Types char, double, short, long
  • The "not" operator ! and the bitwise operators
  • Functions, classes and objects
  • Arrays and strings

Reference: any book on Java programming.

Two Sample Questions for the Java Placement Exam

1. Fill in the spaces marked with ____ to complete the following Boolean expressions. Do not use the Boolean operator "!" in your answer. Write only in the spaces marked with ____. Assume that X, Y and Z are integer variables.

An expression that is true if X is strictly the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 45, the expression should be true, but if X is 50, Y is 40, and Z is 50, the expression should be false, since X is not strictly greater than Z.

(______) _____ (______)

An expression that is true if X is is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true.

(______) _____ (______)

2. Assume that System.out.print and System.out.println are print functions (the latter printing a carriage return after the output) and assume that there is a method IO.readInt() that reads in an integer. Consider the following method (procedure) in some class:

    public static void main()
    { 
       int n, k, max; 
       max = IO.readInt();        /* read value for max */
       for (n = 0; n < max; n++)
       {  for (k = 0; k < max; k++)
          {  if (n > k)
                System.out.print(" G ");
             else if (n < k)
                System.out.print(" L ");
             else
                System.out.print(" E ");
          }
          System.out.println();
       }
    }
    

Show the output of main() if

  • the value input for max is 5
  • the value input for max is 1
  • the value input for max is 0

Top

Topics Covered by the C/C++ Placement Exam

The C/C++ version of the placement exam covers the following topics

  • Variables: types int and float
  • The arithmetic operators +, -, *, /
  • The relational operators <, <=, >, >= and ==
  • The boolean operators && and ||
  • Assignment statements and increment operators (e.g. x++)
  • The if-else statements, including nested if-else statements
  • The for loop, including nested for loops
  • Standard C++ input and output using cin and cout, as illustrated by the following program which reads two integers from the input and prints them to the output. Notice the use of endl to end the line that is output.

   main()
   {
       int number1, number2;
       cin >> number1 >> number2; /* read two numbers */
       cout << "The first number that was input was " << number1 << endl;
       cout << "The second number that was input was " << number2 << endl;
   }
   

The C/C++ version of the placement exam does NOT cover

  • Types char, double, short, long
  • The "not" operator ! and the bitwise operators
  • Functions, classes and objects
  • Arrays and strings
  • Pointers
  • The while, do and switch statements
  • The standard C input and output statements scanf and printf
  • Shorthand assignment (e.g. x *= 10)

Reference: any book on C programming. If you use a book on C++ programming, make sure you are studying the basic C syntax, not the C++ extensions. For cin and cout, which are not part of standard C, all you need to know is illustrated in the example above.

Two Sample Questions for the C/C++ Placement Exam

1. Fill in the spaces marked with ____ to complete the following Boolean expressions. Do not use the Boolean operator "!" in your answer. Write only in the spaces marked with ____. Assume that X, Y and Z are integer variables.

An expression that is true if X is strictly the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 45, the expression should be true, but if X is 50, Y is 40, and Z is 50, the expression should be false, since X is not strictly greater than Z.

(______) _____ (______)

An expression that is true if X is is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true.

(______) _____ (______)

2. Consider the following program:

    main()
    { 
       int n, k, max; 
       cin >> max;        /* read value for max */
       for (n = 0; n < max; n++)
       {  for (k = 0; k < max; k++)
          {  if (n > k)
                cout << " G ";
             else if (n < k)
                cout << " L ";
             else
                cout << " E ";
          }
          cout << endl;
       }
    }
    

Show the output of the program if

  • the value input for max is 5
  • the value input for max is 1
  • the value input for max is 0

Top

Topics Covered by the Pascal Placement Exam

The Pascal version of the placement exam covers the following topics

  • Variables: types integer and real
  • Arithmetic and Boolean operators and expressions
  • The assignment statement
  • The if-then-else statement, including nested if-then-else statements
  • The for loop, including nested for loops
  • Input and output using read, write, and writeln (not readln)

The Pascal version of the placement exam does NOT cover

  • Characters and strings
  • Procedures and functions
  • Arrays
  • Pointers
  • The while, repeat and case statements.

Reference: any book on Pascal programming e.g. Turbo Pascal, Samuel Marateck, Wiley, Chapters 3, 4, 5, and 7 (except the "case" statement).

Two Sample Questions for the Pascal Placement Exam

1. Fill in the spaces marked with ____ to complete the following Boolean expressions. Do not use the Boolean operator "not" or the function "ord" in your answer. Write only in the spaces marked with ____. Assume that X, Y and Z are integer variables.

(______) ____ (______)

An expression that is true if X is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true. (______) ____ (______)

2. Consider the following program:

   program numbers;
   var N, K, MAX: integer;
   begin
      read(MAX);
      for N := 1 to MAX do
         begin
            for K := 1 to MAX do
               if N > K then
                  write(' G ')
               else if N < K then
                  write(' L ')
               else
                  write(' E ');
            writeln
         end
   end.

Show the output of the program if

  • the value input for MAX is 5
  • the value input for MAX is 1
  • the value input for MAX is 0

Top

Topics Covered by the Python Placement Exam

The Python version of the placement exam covers the following topics:

  • Variables: integers, floats, strings, and boolean values
  • The arithmetic operators +, -, *, /, //
  • The relational operators <, <=, >, >=, and ==
  • The boolean operators and, or
  • The if-else statements, including nested if-else statements
  • for and while loops, including nested for and while loops
  • lists

The Python version of the placement exam does NOT cover:

  • modules
  • dictionaries
  • classes

Reference: any book on Python programming

Two Sample Questions for the Python Placement Exam

  1. Write a program that reads 10 different integers and prints the one that has the largest value.

  2. Consider the following: (Note that print(...end='') will print to the same line; and print( ... ) will print to the next line.)

    m = int(input("Enter a number: "))
    for n in range(m):
        for k in range(m):
            if (n > k):
                print (" G ", end='')
            elif (n < k):
                print (" L ", end='')
            else:
                print(" E ", end='')
        print(" ")
    

    Show the output if:

    • the value input for max is 5
    • the value input for max is 1
    • the value input for max is 0


Top

Topics Covered on the Introduction to Web Design Placement Exam (to try to place out of CSCI-UA 4 Introduction to Web Design and Computer Principles)

The Web Design placement exam covers the following topics:

  • HTML - page content (text, multi-media, hypertext, tables, lists and other elements that comprise the basic HTML page structure)
  • CSS - page layout, formatting content
  • Photoshop - image manipulation, preparing images for use on the web

It does not cover:

  • JavaScript, PHP or other web development languages
  • Functionality new to HTML5 / CSS3
  • Adobe Creative Suite - InDesign, Flash, etc.

Two Sample Questions for the Introduction To Web Design Placement Exam

  1. How is the padding property used in CSS? Describe and illustrate your answer with code.
  2. Given the following excerpt from a webpage:
  3. <head>
    <title>Come to New York City!</title>
    <link href="styles1.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    .lowerHeading {
          font-variant: small-caps;
          color: #336699;
    }
    </style> </head>
    • TRUE/FALSE: It is clear from the code above that there are images in the body of this webpage.
    • TRUE/FALSE: It is clear from the code above that the first line in the body of this webpage will read "Come to New York City!"
    • TRUE/FALSE: It is clear from the code above that this page contains one in-line style.
    • TRUE/FALSE: It is clear from the code above that an external stylesheet is linked from this page.
    • TRUE/FALSE: Using <span class="lowerHeading">Sample</span> in the body of this webpage will render the word Sample in small-caps.


    For further information, please e-mail the Undergraduate Program Administrator.

    top | contact webmaster@cs.nyu.edu