摘要: #include <stdio. h> int fun( int a ) { int b = 0; static int c = 3; a = ( c + +,b + + ); return ( a ); } main( ) { int a = 2,i,k; for( i = 0;i&l 阅读全文
posted @ 2022-09-16 19:12 一树懒 阅读(28) 评论(0) 推荐(0)
摘要: (*p)++和*(p++)和*p++的区别 前缀递增递减和*优先级相同,从右到左; 后缀递增递减比前缀优先级高,从左到右。 比如: 1 2 int arr[5] = { 1,3,5,7,9 }; int *p = arr; *++p:p先自+,然后*p,最终为3 ++*p:先*p,即arr[0]=1 阅读全文
posted @ 2022-09-16 13:13 一树懒 阅读(635) 评论(0) 推荐(0)
摘要: 给你一个字符串 s,由若干单词组成,单词前后用一些空格字符隔开。返回字符串中 最后一个 单词的长度。单词 是指仅由字母组成、不包含任何空格字符的最大子字符串。 示例 1: 输入:s = "Hello World" 输出:5 解释:最后一个单词是“World”,长度为5。示例 2: 输入:s = " 阅读全文
posted @ 2022-09-16 13:03 一树懒 阅读(35) 评论(0) 推荐(0)