摘要:1 #include <stdio.h> 2 #include <string.h> 3 4 char *strconv(char *p) 5 { 6 int length = strlen(p) ; 7 char *ptr = p ; 8 char *ptr_1 = p+length - 1; 9
阅读全文
posted @ 2020-07-03 23:49
|
|
|
随笔分类 - 面试经历
面试中遇到的问题记录
摘要:1 #include <stdio.h> 2 #include <string.h> 3 4 char *strconv(char *p) 5 { 6 int length = strlen(p) ; 7 char *ptr = p ; 8 char *ptr_1 = p+length - 1; 9
阅读全文
posted @ 2020-07-03 23:49
摘要:题目:通过C语言,基于以下语句编写一函数,可以找出数组中最大值和最小值 void SearchMax_Min(unsigned char arr[],int len,unsigned char* max,unsigned char* min) 答案: 1 void SearchMax_Min(uns
阅读全文
posted @ 2020-06-27 11:42
摘要:1 #include <stdio.h> 2 #include <string.h> 3 4 //逆序排列 5 void invertSort(char str[], int len) 6 { 7 printf("逆序排列 : ") ; 8 for(int i = len-1 ; i >= 0 ;
阅读全文
posted @ 2020-06-13 17:11
摘要:1 #include <stdio.h> 2 3 //判断是否是三角形 4 void judgeTriangle(float a,float b,float c) 5 { 6 //验证边与边的关系 7 if( (a + b > c) && (a + c > b) && (b + c > a) ) 8
阅读全文
posted @ 2020-06-12 21:21
摘要:今天面试嵌入式,突然遇到这么一道题目,虽然简单,但鉴于我答得不是很好,所以还是分析一下为好。 第一种方法: 通过加减法。 1 #include"stdio.h" 2 int main(void) 3 { 4 int a=6,b=8; 5 a=a+b; 6 b=a-b; 7 a=a-b; 8 prin
阅读全文
posted @ 2019-03-20 19:45
|
|