软考真题练03+编程

今天下午没课,我把昨天剩下的35道软考题刷完了,第一次做上午题距离及格还差4分加油!
1软考真题练03+编程_第1张图片(C)
解析:题目要求按照关键的顺序,不然D也正确
2.软考真题练03+编程_第2张图片
(B)
3.若对一个链表最常用的操作是在末尾插入结点和删除尾结点,则采用仅设尾指针的单向循环链表(不含头结点)时,(C)。
A.插入和删除操作的时间复杂度都为O(1)
B.插入和删除操作的时间复杂度都为O(n)
C.插入操作的时间复杂度为O(1),删除操作的时间复杂度为O(n)
D.插入操作的时间复杂度为O(n),删除操作的时间复杂度为O(1)
解析:进行插入时直接插道尾指针后面就行了,但是删除的话需要找到尾指针前面一个就得遍历将其覆盖然后,–
IP地址块222.125.80.128/26包含了(C)个可用主机地址,其中最小地址是(B),最大地址是(B)。
4 A. 14 B. 30 C. 62 D. 126
5. A. 222.125.80.128 B. 222.125.80.129
C. 222.125.80.159 D. 222.125.80.160
6. A. 222.125.80.128 B. 222.125.80.190
C. 222.125.80.192 D. 222.125.80.254
解析:网络位占了26位,剩下6位为主机位,2的6次方-2,全1和全0
7. 以下HTML代码中,创建指向邮箱地址的链接正确的是(D)。
(69)A. [email protected]
B. [email protected]
C. [email protected]
D. [email protected]
8.9.10 做这种计算机英语完形填空其实和普通的英语完型填空差不多,但是涉及的单词和话题与计算机分不开,要想要看该空的上下文含义及其某个单词的重复率。
Observe that for the programmer, as for the chef, the urgency of the patron(顾客)may govern the scheduled completion of the task, but it cannot govern the actual completion.An omelette(煎鸡蛋), promised in two minutes, may appear to be progressing nicely. Butwhen it has not set in two minutes, the customer has two choices—waits or eats it raw.Software customers have had (71)choices.
Now I do not think software (72)have less inherent courage and firmness thanchefs, nor than other engineering managers. But false(73)to match the patron’s desireddate is much more common in our discipline than elsewhere in engineering. It is very (74) to make a vigorous, plausible, and job risking defense of an estimate that is derived by no quantitative method, supported by little data, and certified chiefly by the hunches of the managers.
Clearly two solutions are needed. We need to develop and publicize productivity figures, bug-incidence figures, estimating rules, and so on. The whole profession can only profit from (75)such data. Until estimating is on a sounder basis, individual managers will need to stiffen their backbones and defend their estimates with the assurance that their poor hunches are better than wish derived estimates.
(B)A. no B. the same C. other D. lots of
(C)A. Testers B. constructors C. managers D. architects
(D)A. Tasks B. jobs C. Works D. scheduling
(B)A. easy B. difficult C. simple D. painless
(A)A. sharing B. excluding C. omitting D. ignoring
编程题
今天用了一个笨笨的方法,明天会再想一个好方法的,晚安啦

package 编程题刷题;

import java.util.Scanner;

public class Day_02 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		/*需求:
		 * 输入一个矩阵,
		 * 按照从外向里以顺时针的顺序依次打印出每一个数字,
		 * 例如,如果输入如下4 X 4矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
		 *  则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10.
		 *  
		 * 思路:1.利用n维数组输入4*4的矩阵
		 * 		2.4层for循环嵌套
		 * 		3.判断输出
		 * 
		 *  */
		int a [][]=new int[][]{{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}};
		int row=a.length;
		int col=a[a.length-1].length;
		int row0=0;
		int col0=0;
		while(row==col){
			for(int i=row0;i<col;i++){
				System.out.print(a[row0][i]+" ");
				if(i==col-1){
					//break;
					for(int j=1;j<row;j++){
						System.out.print(a[j][i]+" ");
						if(j==row-1){
							//break;
							for(int i1=col-2;i1>=0;i1--){
								System.out.print(a[j][i1]+" ");
								if(i1==0){
									//break;
									for(int j1=row-2;j1>=1;j1--){
										
										System.out.print(a[j1][col0]+" ");
									if(j1==1){
										row0++;
										col0++;
										row=row0;
										col=col0;
										break;
									}
									}
								}
							}
						}
					}
					if(row>row/2-1||col>col/2-1){
						return;
					}
				}
		}
			
			
			
		}
		row=1;
	}
}




 



      


你可能感兴趣的:(刷题)