CS 61C (Fall 2007) |
Quiz 1Two questions, submit as "quiz1". Due 2:45pm before lecture 8/29/2007. |
Throughout this semester, you will be using the "submit" command to submit your homework, project and quiz solutions. For those of you new to Berkeley, you do this as follows:
To submit your quiz, use the name "quiz1" and fill your answers in to a copy of
~cs61c/files/quiz/1/template.txt
.
You should replace the text <answer>
with your answer, and <explanation>
with your explanation, an explanation is shown below. The important thing
is that the question number be followed by a period, and then the answer, with the
explanation on any subsequent lines. Notice that if you want to put a numbered
list in your answers, make sure to put a tab before your numbers so our autograder
doesn't misread your explanation as more answers.
1. g I think the answer is g, despite the fact that that's not an option, because I like to get low quiz scores. This is a second line of explanation. 2. bar It's not the answer, it's just where I like to do my work. 1. This list is part of my explanation, the autograder won't get confused because I used tabs. 2. I like to make lists. 3. Oxygen is good.
#include <stdio.h> int main ( ) { int c; while ((c = getchar( )) != 'x') { putchar (c); } return 0; }
xpxq
is provided as input. What gets output?
x
xx
p
pq
c = getchar ( )
are removed.