The hottest 2005 national computer grade examinati

2022-07-25
  • Detail

In 2005, the national computer grade examination level II C language real questions 3

page 3

(45) has the following procedures

point (char *p)

{

p+=3;

}

main()

{char b[4]={'a','b','c','d'}, *p=b

point(p); printf("%cn",*p);

}

the output result after the program is run is a

a) a

b) b

c) c

d) d

(46) if the following description and definition statement

char fun (char *) is provided in the program

main()

{

char *s="one",a[5]={0},(*f1)()=fun,ch;

...

}

the correct call statement to function fun in the following options is a

a) (*f1) (a)

B)*f1(*s);

c) fun (

d) ch=*f1 (s)

(47) has the following structure description and variable definition. As shown in the figure, the pointer PQR points to three consecutive nodes in this linked list

struct node

{

int data;

struct node *next;

} *p,*q,*r;

now you want to delete the node indicated by Q from the linked list while maintaining the continuity of the linked list. The following statements that cannot complete the specified operation are d

a) p- next=q- next

B)p- next=p- next- next;

C)p- next=r;

D)p=q- next;

(48) in the following definitions of structure type variable TD, 2. The functional characteristics of anchorage fatigue testing machine are wrong: c

a) typedef struct aa

{

int n;

float m;

}aa

AA td;

B)struct aa

{

int n;

float m;

} td;

struct aa td;

C)struct

{

int n;

float m;

}aa;

struct aa td;

D)struct

{

int n;

float m;

}td;

(49) d

a) feof (FP)

b) fTell (FP)

c) fgetc (FP)

d) rewind (FP)

(50) has the same function as the function fseek (FP, 0l, seeku set)

a "stdio.h"

void writestr (char *fn char, char *str)

{

file *fp;

fputs (STR, FP);

fclose (FP);

}

main()

{

writestr ("t", "start");

writestr ("t","end");

}

after the program runs, the contents in the file T are b

a) start

b) end

c) startend

d) endrt

to be continued...

2005 April 2 c written test paper and answer, come and answer (3)

fill in the blanks (2 points for each blank, 40 points in total)

(1) in a binary tree, there are 18 nodes with degree 2, then there are 19 leaf nodes in the binary tree

(2) in object-oriented methods, instances of classes are called objects

(3) the work of diagnosing and correcting errors in the program is usually called program debugging

(4) in a relational database, data is represented as two-dimensional tables, and each two-dimensional table is called a relationship

(5) a correct and complete description of the problem solution is called an algorithm

(6) when the following program is running, if you input from the keyboard: 102030, you can also compare the toughness of the material. Enter the Vicat tester for thermal deformation. The output is 10300

include

main()

{int i=0, j=0, k=0;

scanf ("%d%*d%d", I, J,

printf ("%d%dn", I, J, K);

}

(7) the output result of the following program after running is 81

define s (x) 4*x*x+1

main()

{

int i=6, j=8;

printf ("%dn", s (i+j));

}

(8) the output result of the following programs after running is 4599

main()

{

int&

Copyright © 2011 JIN SHI