前几天刚刚在海洋大学参加完笔试,考场的人真是多,小400号人,考完之后因为收到了另外公司的offer,之后就没管朗讯的了。现在有时间在这里分享一下笔试题,希望对来年有意向的师弟师妹们有帮助。
总结来说考的题都很基础,选择题35道,剩下的全是C编程的,有需要写程序输出结果的,还有一道大编程题。但是因为我不是通信专业的,前面的一半信号相关的选择题不是很好选,其他的选择题是关于linux操作系统、os、数据结构和数据库的选择题。下面是我抄下来的编程题。
第一题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <stdio.h> void main( void ) { int x = 15; while (x < 20) { x++; if (x/3 != 0){ x++; break ; } else { continue ; } } printf ( "%d\n" ,x); } |
输出结果:17
第二题:输入是5,求输出
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include <stdio.h> void main() { int a,b[10],c,i = 0; printf ( "Input a number\n" ); scanf ( "%d" , &a); while (a != 0){ c = a%2; a = a/2; b[i] = c; i++; } for (;i > 0;i--) printf ( "%d" ,b[i-1]); } |
输出结果:101
第三题:
1 2 3 4 5 6 7 8 9 | #include <stdio.h> void main() { char *ptr = "ALU Systems" ; *ptr++; printf ( "%s\n" , ptr); ptr++; printf ( "%s\n" , ptr); } |
输出结果:LU Systems
U Systems
第四题:
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include <stdio.h> void main() { int a,b,i; a = b = 0; for (i = 0; i <= 10; i += 2) { a += i; b += i + 1; } printf ( "a=%d\n" , a); printf ( "b=%d\n" , b - 11); } |
输出结果:a=30
b=25
第五题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include <iostream> using namespace std; class a{ public : a(){cout<< "a" <<endl;} ~a(){cout<< "~a" <<endl;} }; class b{ public : b(a &aa):_aa(aa){cout<< "b" <<endl;} ~b(){cout<< "~b" <<endl;} private : a _aa; }; int main() { a aa; b bb(aa); return 0; } |
输出结果:a
b
~b
~a
~a
第六题:没有记下来,是链表的题,要求编写有五个节点的链表,打印其值,然后把值反转,在此打印其值。