问题 写作题
书面表达。
       假如你叫Zhang Jun,请根据所给内容,作适当发挥后,写一往篇60字左右的
自我介绍短文。
Name:Zhang Jun Favorite color:  Green,blue
Birthplace: Datian Favorite object: English,Chinese
School: Datian No.1 High School Parents' job: Teacher
Looks: Tall, big eyes… Telephone number: (0598)7223-7838

                                                                                                                             
                                                                                                                             
                                                                                                                             
答案

      My name is Zhang Jun. I'm from Datian. I'm a student. I study in Datian No.1 High School. I am tall.

I have big eyes and a wide mouth. My favorite color is green and blue. My favorite object is English and

Chinese. My parents are both teachers. They work in the same school. My telephone number is

(0598)7223-7838. Do you want to make friends with me?

问答题

已知检查括号匹配及注释、字符串处理的C源程序如下:

#include<stdio.h>

int brace,brack,paren;

void in_quote(int c);

void in_comment(void);

void search(int c);

/*rudimentary syntax checKer for C program*/

int main()

int c;

extern int brace,brack,paren;

while((c=getchar())!=EOF)

if(c==’/’)

if((c=getchar())==’*’)

in_comment(); /*inside comment*/

else

search(C) ;

else if(c==’\"||c=="")

in_quote(c); /*inside quote*/

else

search(c);

if(brace<0) /*output errors*/

printf("Unbalanced braces\n");

brace=0;

else if(brack<0)

printf("Unbalanced brackets\n");

brack=0;

else if(paren<0)

printf("Unbalanced parentheses\n");

paren=0;

if(brace>0) /*output errors*/

printf("Unbalanced braces\n");

if(brack>0)

printf("Unbalanced brackets\n");

if(paren>0)

printf("Unbalanced parentheses\n");

return 0;

/*search:search for rudimentary syntax errors*/

void search(int c)

extern int brace,brack,paren;

if(c==’’)

++brace;

else if(c==’’)

--brace;

else if(c==’[’)

++brack;

else if(c==’]’)

--brack;

else if(c==’(’)

++paren;

else if(c==’)’)

--paren;

/*in_comment:inside of a valid comment*/

void in_comment(void)

int c,d;

c=getchar();

d=getchar(); /*curr character*/

while(c!=’*’||d!=’/’) /*search for end*/

c=d;

d=getchar();

/*in_quote:inside quote*/

void in_quote(int c)

int d;

while((d=getchar())! =c) /*search end quote*/

if(d==’\\’)

getchar(); /*ignore escape seq*/

画出程序中main函数的控制流程图;

单项选择题